RohmaAr / SQE

0 stars 0 forks source link

issue 2: user with same credentials can register as many times as they want #2

Closed AliAhsan69 closed 10 months ago

AliAhsan69 commented 11 months ago

After the registration for the 3rd user is successfull, the user can use the same name and info to register again without any problem.

Click on "Regiter here" button Enter same credentials for two different users The system will allow you to register both the users

RohmaAr commented 10 months ago

The system was allowing users to register with the same credentials more than once. The attached branch now ensures that the user registers with a unique username and email. In case such conditions aren't met, a modal is displayed, showing an error message. The added functions isEmailUnique(User user) and isUserUnique(User user) functions of user in turn return userDao's function of the same name that return boolean value after checking if the passed user's email and username already exist in database register code change register modal controller changes register

error for same email error for same username