1
0
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:
Kyle Spearrin 2018-07-13 11:04:09 -04:00
parent 938b7f1230
commit 49947e382d

View File

@ -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);