private async Task CreateHostUserAsync(DataSeedContext context) { var user = await _userRepository.FindByNormalizedUserNameAsync("HostUser"); if (user == null) { user = new IdentityUser( _guidGenerator.Create(), "HostUser", "*****@*****.**", context.TenantId ); user.SetProperty("IsHostUser", true); await _userManager.CreateAsync(user, "1q2w3E*"); await _userManager.AddToRoleAsync(user, "admin"); } }
public static void SetTitle(this IdentityUser user, string title) { user.SetProperty(TitlePropertyName, title); }
public static void SetSocialSecurityNumber(this IdentityUser user, string number) { user.SetProperty(SocialSecurityNumber, number); }