Environment : SharePoint 2013 , FBA implementation, SQL server 2012.
Issue Definition : it is not allowing us to add same user name existing in resembling name of organization as shown below. it shows an exception at 2 places.
Robert.Green robert.green@ABC -> Successful
Robert.Green robert.green@ABC Codes Service -> FAIL – Exception, User does not exist, User not found
Below is code for adding users.
spWeb.SiteUsers.Add("i:0#.f|providername|robert.green@Codes Service", user.Email, user.UserName, string.Empty); - Exception : User does not exist
sharepointUser = spWeb.SiteUsers["i:0#.f|providername|robert.green@Codes Service"];
Exception : User not found