1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 21:18:13 -05:00

Refactor variable naming in ValidateClaimedUserDomainAsync

This commit is contained in:
jrmccannon 2025-04-01 15:26:11 -05:00
parent 6b26333ab8
commit 9df01faffc
No known key found for this signature in database
GPG Key ID: CF03F3DB01CE96A6

View File

@ -619,16 +619,16 @@ public class UserService : UserManager<User>, IUserService, IDisposable
public async Task<IdentityResult> ValidateClaimedUserDomainAsync(User user, string newEmail) public async Task<IdentityResult> ValidateClaimedUserDomainAsync(User user, string newEmail)
{ {
var managingOrganizations = await GetOrganizationsClaimingUserAsync(user.Id); var claimingOrganization = await GetOrganizationsClaimingUserAsync(user.Id);
if (!managingOrganizations.Any()) if (!claimingOrganization.Any())
{ {
return IdentityResult.Success; return IdentityResult.Success;
} }
var newDomain = CoreHelpers.GetEmailDomain(newEmail); var newDomain = CoreHelpers.GetEmailDomain(newEmail);
var verifiedDomains = await _organizationDomainRepository.GetVerifiedDomainsByOrganizationIdsAsync(managingOrganizations.Select(org => org.Id)); var verifiedDomains = await _organizationDomainRepository.GetVerifiedDomainsByOrganizationIdsAsync(claimingOrganization.Select(org => org.Id));
if (verifiedDomains.Any(verifiedDomain => verifiedDomain.DomainName == newDomain)) if (verifiedDomains.Any(verifiedDomain => verifiedDomain.DomainName == newDomain))
{ {