This commit is contained in:
@@ -586,14 +586,16 @@ namespace AyaNova.Util
|
|||||||
u.Active = active;
|
u.Active = active;
|
||||||
|
|
||||||
var p = new Bogus.Person();
|
var p = new Bogus.Person();
|
||||||
|
|
||||||
u.Name = Uniquify(p.FullName);
|
u.Name = Uniquify(p.FullName);
|
||||||
|
var bogusEmail = u.Name.ToLowerInvariant().Replace(" ", "_") + "@example.net";
|
||||||
if (login != null)
|
if (login != null)
|
||||||
{
|
{
|
||||||
u.Login = login;
|
u.Login = login;
|
||||||
u.Name += " - " + login;
|
u.Name += " - " + login;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
u.Login = u.Name;//must be unique, name is unique
|
u.Login = bogusEmail;
|
||||||
|
|
||||||
if (password != null)
|
if (password != null)
|
||||||
u.Password = password;
|
u.Password = password;
|
||||||
@@ -620,7 +622,7 @@ namespace AyaNova.Util
|
|||||||
//Children and relations
|
//Children and relations
|
||||||
u.UserOptions = new UserOptions();
|
u.UserOptions = new UserOptions();
|
||||||
u.UserOptions.TranslationId = translationId;
|
u.UserOptions.TranslationId = translationId;
|
||||||
u.UserOptions.EmailAddress = Fake.Internet.ExampleEmail();
|
u.UserOptions.EmailAddress = bogusEmail;
|
||||||
u.UserOptions.Hour12 = true;
|
u.UserOptions.Hour12 = true;
|
||||||
u.UserOptions.CurrencyName = "USD";
|
u.UserOptions.CurrencyName = "USD";
|
||||||
u.UserOptions.UiColor = Fake.Internet.Color().ToUpperInvariant();
|
u.UserOptions.UiColor = Fake.Internet.Color().ToUpperInvariant();
|
||||||
@@ -746,7 +748,7 @@ namespace AyaNova.Util
|
|||||||
throw new System.Exception(err);
|
throw new System.Exception(err);
|
||||||
}
|
}
|
||||||
//Customer contacts
|
//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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user