A client wants to use emails as usernames. The reason is that this multisite solution has users with different email domains so there's a chance that stripping @domain.com will cause a duplicate username to be created by an automated process. I found this blog but I started getting an error saying that the email I was using was invalid when trying to create a user with Sitecore.Security.Accounts.User.Create(string userName, string password)
. The error was as follows:
Exception thrown: 'System.Web.Security.MembershipCreateUserException' in System.Web.dll. The E-mail supplied is invalid.
at System.Web.Security.Membership.CreateUser(String username, String password, String email) at Sitecore.Security.Accounts.User.Create(String userName, String password) at CroweHorwath.SiteGenerator.Generic.Services.BaseSiteGeneratorService.CreateUser(UserInformation userInformation, INotifySiteGeneratorProgress progress) in C:\Projects\Crowe\Code\CroweHorwath\CroweHorwath.SiteGenerator.Generic\Services\BaseSiteGeneratorService.cs:line 358
Is there a different method that I should use instead of Sitecore.Security.Accounts.User.Create(string userName, string password)
?