Exemple #1
0
        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");
            }
        }
Exemple #2
0
 public static void SetTitle(this IdentityUser user, string title)
 {
     user.SetProperty(TitlePropertyName, title);
 }
Exemple #3
0
 public static void SetSocialSecurityNumber(this IdentityUser user, string number)
 {
     user.SetProperty(SocialSecurityNumber, number);
 }