diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs index 365704914b..f75bf32aaf 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs @@ -130,7 +130,7 @@ namespace Volo.Abp.Identity ExtraProperties = new Dictionary(); } - public IdentityUser(Guid id, [NotNull] string userName, [NotNull] string email, Guid? tenantId = null) + public IdentityUser(Guid id, [NotNull] string userName, string email = null, Guid? tenantId = null) { Check.NotNull(userName, nameof(userName)); @@ -139,7 +139,7 @@ namespace Volo.Abp.Identity UserName = userName; NormalizedUserName = userName.ToUpperInvariant(); Email = email; - NormalizedEmail = email.ToUpperInvariant(); + NormalizedEmail = email?.ToUpperInvariant(); ConcurrencyStamp = Guid.NewGuid().ToString(); SecurityStamp = Guid.NewGuid().ToString();