mirror of
https://github.com/bitwarden/server.git
synced 2024-12-23 17:07:42 +01:00
only check token valid if registration is disabled
This commit is contained in:
parent
938b7f1230
commit
49947e382d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user