This commit is contained in:
2020-11-19 23:14:48 +00:00
parent 97ef7d4518
commit 7474c77004

View File

@@ -586,14 +586,16 @@ namespace AyaNova.Util
u.Active = active;
var p = new Bogus.Person();
u.Name = Uniquify(p.FullName);
var bogusEmail = u.Name.ToLowerInvariant().Replace(" ", "_") + "@example.net";
if (login != null)
{
u.Login = login;
u.Name += " - " + login;
}
else
u.Login = u.Name;//must be unique, name is unique
u.Login = bogusEmail;
if (password != null)
u.Password = password;
@@ -620,7 +622,7 @@ namespace AyaNova.Util
//Children and relations
u.UserOptions = new UserOptions();
u.UserOptions.TranslationId = translationId;
u.UserOptions.EmailAddress = Fake.Internet.ExampleEmail();
u.UserOptions.EmailAddress = bogusEmail;
u.UserOptions.Hour12 = true;
u.UserOptions.CurrencyName = "USD";
u.UserOptions.UiColor = Fake.Internet.Color().ToUpperInvariant();
@@ -746,7 +748,7 @@ namespace AyaNova.Util
throw new System.Exception(err);
}
//Customer contacts
await GenSeedUserAsync(log, 2, AuthorizationRoles.CustomerFull, UserType.Customer, true, null, null, 0, null, null, NewObject.Id, null);
await GenSeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, true, null, null, 0, null, null, NewObject.Id, null);
}