Click here to Skip to main content
15,891,674 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how do i make password and username restricted for other users?
Posted
Comments
Tom Marvolo Riddle 29-Apr-14 7:01am    
Sorry.Not at all clear.Explain bit more
RahulMGunjal 29-Apr-14 7:06am    
Need some more details!

1 solution

First off, you don't want to restrict passwords from being the same as other users because that gives information away about the content of other users passwords: that there is at least one user that is using that password. And that is a nice big security hole, right there.

Secondly, it shouldn't be possible to check passwords, because you should be storing them hashed rather than as text - text passwords are a massive security problem - and the hash of two identical passwords from two different users shouldn't be the same anyway!

By all means check usernames: that's trivial! Just look in the database to see if a user with that name exists already before you allow the new user to create an identity on your system.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900