I thought there should be something to compare the username and password for a particular user. If there is same username, but different password, then it checks the comparsion of password and then assigned to that user.
No, I think you have to make the username and password both unique. you can do it by comparing the new entered username and password both unique by comparing with the existing ones by using the compareToIgnoreCase function in a loop.
Abhik Ghosh wrote:No, I think you have to make the username and password both unique. you can do it by comparing the new entered username and password both unique by comparing with the existing ones by using the compareToIgnoreCase function in a loop.
In most databases, the password is stored as a hashed value. No way you can compare them. If two users use the same password, their password will not appear the same in a decent database.