mirror of
https://github.com/bitwarden/server
synced 2025-12-26 05:03:18 +00:00
only check token valid if registration is disabled
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user