CodeIgniter Forums
Supporting Multiple Login Methods - How to Deal with Duplicate Usernames? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Supporting Multiple Login Methods - How to Deal with Duplicate Usernames? (/showthread.php?tid=29696)



Supporting Multiple Login Methods - How to Deal with Duplicate Usernames? - El Forum - 04-18-2010

[eluser]Vik[/eluser]
A lot of sites now support multiple login methods. You can log in using your username/password from Google, Facebook, Twitter, etc.

Question: what do you do when you encounter duplicate usernames? My site has some social capabilities, so it's important for everyone to see everyone else's username. What's the correct way for me to deal with it when I've got a Bob logging in with Google credentials, another Bob logging in with Facebook credentials, and another Bob with Twitter credentials?

Thanks in advance to all for any thoughts or info.


Supporting Multiple Login Methods - How to Deal with Duplicate Usernames? - El Forum - 04-18-2010

[eluser]Jelmer[/eluser]
Maybe use icons or suffixes to denote where the user came from:
Quote:Bob (twitter)
Bob (facebook)

And in your DB you can save the method of logging in in field seperate from the username (and possibly screenname).


Supporting Multiple Login Methods - How to Deal with Duplicate Usernames? - El Forum - 04-19-2010

[eluser]Vik[/eluser]
I implemented some code so that, if someone registers with a username that duplicates somebody else, they are asked to enter a "display name", that is displayed instead of the username - and of course I check to make sure that the display name doesn't duplicate any username or display name.