Browse Source

Use `AbpIdentityResultException` to replace `AbpException`.

pull/18612/head
maliming 3 years ago
parent
commit
c1f129b96c
  1. 3
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs

3
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs

@ -491,6 +491,7 @@ public class IdentityUserManager : UserManager<IdentityUser>, IDomainService
} while (tryCount < maxTryCount);
}
throw new AbpException($"Could not get a valid user name for the given email address: {email}, allowed characters: {Options.User.AllowedUserNameCharacters}, tried {maxTryCount} times.");
Logger.LogError($"Could not get a valid user name for the given email address: {email}, allowed characters: {Options.User.AllowedUserNameCharacters}, tried {maxTryCount} times.");
throw new AbpIdentityResultException(IdentityResult.Failed(new IdentityErrorDescriber().InvalidUserName(userName)));
}
}

Loading…
Cancel
Save