Last post Dec 13, 2014 06:51 PM by Careed
Dec 13, 2014 06:20 PM|JORGEMAL|LINK
I am developing a web site which will make use of the membership framework to validate users. It is common to set (or ask through a user interface) a user name, an email address and a password for each user, but I have thought about using the email address
as the user name so the user saves from defining one piece of information. My UI would only ask for email address and password and, in code, I would set the user name equal to the email and add the record. At first, it seemed a good idea to me but I am realizing
that the user might want to change his/her password and, in such a case, this implies to change the user name which is also the email address. In other words, if the user wants to change the email address, maybe I would need to setup a new user. I am writing
to ask for feedback about this approach.
Dec 13, 2014 06:51 PM|Careed|LINK
If one changes their password, there is no need to change the email address/user name. Additionally, as long as you maintain uniqueness with the user name/email address, then there should be no problem with them changing their email address as well.
In your database, you have an ID field which serves as your primary key. As long as that doesn't change, then your users should be able to make any modifications necessary. Again, just make sure the email address is unique.