Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Install process - Default Admin - assign default store for user field

KrzysztofPajak7a0b06ba6fa9
diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataCustomersAndUsers.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataCustomersAndUsers.cs
index 41fa5a9b5..426741166 100644
--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataCustomersAndUsers.cs
+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataCustomersAndUsers.cs
@@ -101,8 +101,8 @@ namespace Grand.Business.System.Services.Installation
adminUser.ShippingAddress = defaultAdminUserAddress;
adminUser.Groups.Add(crAdministrators.Id);
adminUser.Groups.Add(crRegistered.Id);
- adminUser.UserFields.Add(new UserField() { Key = SystemCustomerFieldNames.FirstName, Value = "John" });
- adminUser.UserFields.Add(new UserField() { Key = SystemCustomerFieldNames.LastName, Value = "Smith" });
+ adminUser.UserFields.Add(new UserField() { Key = SystemCustomerFieldNames.FirstName, Value = "John", StoreId = "" });
+ adminUser.UserFields.Add(new UserField() { Key = SystemCustomerFieldNames.LastName, Value = "Smith", StoreId = "" });
await _customerRepository.InsertAsync(adminUser);
//Anonymous user