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.

Minor changes

KrzysztofPajak0b1e575b3c8b
diff --git a/src/Business/Grand.Business.Customers/Services/CustomerManagerService.cs b/src/Business/Grand.Business.Customers/Services/CustomerManagerService.cs
index c1f2986ce..15b705810 100644
--- a/src/Business/Grand.Business.Customers/Services/CustomerManagerService.cs
+++ b/src/Business/Grand.Business.Customers/Services/CustomerManagerService.cs
@@ -166,7 +166,7 @@ namespace Grand.Business.Customers.Services
result.AddError("Current customer is already registered");
return result;
}
- if (String.IsNullOrEmpty(request.Email))
+ if (string.IsNullOrEmpty(request.Email))
{
result.AddError(_translationService.GetResource("Account.Register.Errors.EmailIsNotProvided"));
return result;
@@ -176,14 +176,14 @@ namespace Grand.Business.Customers.Services
result.AddError(_translationService.GetResource("Common.WrongEmail"));
return result;
}
- if (String.IsNullOrWhiteSpace(request.Password))
+ if (string.IsNullOrWhiteSpace(request.Password))
{
result.AddError(_translationService.GetResource("Account.Register.Errors.PasswordIsNotProvided"));
return result;
}
if (_customerSettings.UsernamesEnabled)
{
- if (String.IsNullOrEmpty(request.Username))
+ if (string.IsNullOrEmpty(request.Username))
{
result.AddError(_translationService.GetResource("Account.Register.Errors.UsernameIsNotProvided"));
return result;
diff --git a/src/Core/Grand.Domain/Customers/CustomerExtensions.cs b/src/Core/Grand.Domain/Customers/CustomerExtensions.cs
index e220ece42..95337223e 100644
--- a/src/Core/Grand.Domain/Customers/CustomerExtensions.cs
+++ b/src/Core/Grand.Domain/Customers/CustomerExtensions.cs
@@ -8,6 +8,7 @@ namespace Grand.Domain.Customers
public static class CustomerExtensions
{
#region Customer
+
/// <summary>
/// Gets a value indicating whether customer a anonymous
/// </summary>
@@ -18,7 +19,7 @@ namespace Grand.Domain.Customers
if (customer == null)
throw new ArgumentNullException(nameof(customer));
- return customer.IsSystemAccount;
+ return customer.IsSystemAccount && !string.IsNullOrEmpty(customer.SystemName);
}