Forum Moderators: phranque

Message Too Old, No Replies

Using email address as login name?

Any drawbacks?

         

idfer

10:01 pm on Apr 2, 2008 (gmt 0)

10+ Year Member



Hi all, i'm writing a web application in PHP/Mysql that involves user registration and possibly posting material. I was thinking of making the user's email address their login name, as opposed to their nickname, thinking it'll be easier for them to remember (they still get to choose a unique nickname for display). Or alternatively letting them login using either their email address or nickname. Any drawbacks to this? The only one i can see is that one can't have multiple users associated with the same email address, but that's fine in the context of my application.

surrealillusions

9:53 am on Apr 3, 2008 (gmt 0)

10+ Year Member



>> The only one i can see is that one can't have multiple users associated with the same email address

Thats not a drawback as far as i can see for any application

:)

youngray

3:24 pm on Apr 3, 2008 (gmt 0)

10+ Year Member



i think it a good idea of you to make email as your website login name,but i think that before you put infomation into your database ,you should check if the mail address exist

mikhaill

6:50 am on Apr 4, 2008 (gmt 0)

10+ Year Member



I did that once long ago when I was just starting out in development. Then issues come up when people decide to change the email address for whatever reason. Assign each user a number ID that you store in your DB along with the email. Reference the users by the ID everywhere. This way if they want to change their email its not a problem.

Trucker

2:51 pm on Apr 4, 2008 (gmt 0)

10+ Year Member



mikhaill beat me to it.

Definitely don't key on the email address. I use a site that let's me update my email address, but my login is still an email address I used about 4 years ago.

Don't make your users remember old email addresses.

maximillianos

7:34 pm on Apr 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just don't make it a key as the others have stated and you'll be fine.

We have been using email as the userid for years. Seems to be ok. We allow folks to change their email if needed. We also use a handle/nickname field that is unrelated their login email. This allows them to be able to build their identity around a more permanent handle instead of the ever changing login email address.

But again, use a numeric autoincrement database id as the key will save you tons of problems down the road.