Skip to content

Commit

Permalink
Commit reversal teqniceue: QWERTYUI
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Apr 16, 2026
1 parent 33505ee commit 9c82906
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean isEmailTaken(String email){
* match is found
* @throws RuntimeException if a {@link SQLException} occurs while executing the query
*/
public User getUserFromDBUsernameAndPassword(String username, String password) {
public User getUserFromDBUsernameAndPassword(String email, String password) {
PasswordHasher hasher = new PasswordHasher();
String hashedpassword = hasher.getHashPassword(password);

Expand All @@ -93,10 +93,10 @@ public User getUserFromDBUsernameAndPassword(String username, String password) {
FROM User u
LEFT JOIN Settings s ON u.UUID_User = s.User_UUID_user
LEFT JOIN Messages m ON u.UUID_User = m.user_id
WHERE u.user_name = ? AND u.user_password = ?;
WHERE u.user_email = ? AND u.user_password = ?;
""";
PreparedStatement stmt = conn.prepareStatement(sql_query);
stmt.setString(1, username);
stmt.setString(1, email);
stmt.setString(2, hashedpassword);

ResultSet rs = stmt.executeQuery();
Expand Down

0 comments on commit 9c82906

Please sign in to comment.