From 7474c7700495366c8383e00e0d8f789c9adc67de Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 19 Nov 2020 23:14:48 +0000 Subject: [PATCH] --- server/AyaNova/util/Seeder.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index 19f92827..ace3e6c7 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -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); }