From 49947e382d561951739bb0bed1f40c82104a65ce Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 13 Jul 2018 11:04:09 -0400 Subject: [PATCH] only check token valid if registration is disabled --- src/Core/Services/Implementations/UserService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs index eefadac2a3..23ae1b362a 100644 --- a/src/Core/Services/Implementations/UserService.cs +++ b/src/Core/Services/Implementations/UserService.cs @@ -213,7 +213,7 @@ namespace Bit.Core.Services string token, Guid? orgUserId) { var tokenValid = false; - if(!string.IsNullOrWhiteSpace(token) && orgUserId.HasValue) + if(_globalSettings.DisableUserRegistration && !string.IsNullOrWhiteSpace(token) && orgUserId.HasValue) { tokenValid = CoreHelpers.UserInviteTokenIsValid(_organizationServiceDataProtector, token, user.Email, orgUserId.Value);