Hi,
We believe there is a bug introduced in v4.00.
Customer is unable to login if customer is created from Admin when CustomerSetting.UsernameEnabled is set to false.
Steps to Reproduce:1. Set UsernamesEnabled as false in Settings -> customer Settings.
2. Create new customer from Admin area.
3. Try to login from customer area with this new user's email.
Actual Result:User is unable to login and the page ends up to exception.
Reason:When customer is created from admin area, username field is left 'null' which in turn ends to null exception while creating claim in CookieAuthenticationService.SignIn(Customer customer, bool isPersistent)
Solution:In '..\Presentation\Nop.Web\Areas\Admin\Controllers\CustomerController.cs'
'Create' Post action near Line 900 where Customer object is created the username should be set to model.Email if UsernameEnabled is false else it should be model.Username
Username = _customerSettings.UsernamesEnabled ? model.Username : model.Email
Hope this helps.
Best Regards,
Atluz Nop Team