Request: Make email address the user id



Most authentication providers are moving to using the email address as the user id.  This facilitates the end users being able to remember their user id as well as only having to ask for their email address when resetting their password.


I've actually done that with another project I worked on. The one issue I ran into is that an email address can be changed, so it couldn't be used as the actual userid (changing the user id on SharePoint requires an administrator to migrate the user). I ended up just generating a guid for the user id, and using the email address to look up the user id when the user logged in.  The one problem with this though is that there are several places in SharePoint where the user ID is show instead of the users full name - and because of the guid it's unrecognizable at a glance who the user is.

Raise it as a feature request in the issue tracker and i'll consider it for a future release.


I can see where that might cause problems.  My issue is - how does the user determine their username if they have forgotten it?  What about new functionality where there is a "Forgot username" web part?  Plus, that would beg the question - do you only allow one unique email address in the database, or allow them to have multiple accounts with the same email address?


It would be easy enough to change the Recover Password web part to accept email addresses. But yeah, once you go that route you have to limit the accounts to unique email addresses. This is actually supported by the SQL Membership Provider - there's a RequiresUniqueEmail option that enforces this.


Oh - ok.  I wasn't aware of that, but I activated the unique email and it threw an error when I tried to create a new user.  So, all that's really needed now is a method for the user to retrieve their user id.  Thanks for the help.