Skip to content

Commit

Permalink
fix login() method in AuthenticationService
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmadev committed Aug 4, 2024
1 parent b12f62c commit fb9f0e3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/java/mate/academy/service/AuthenticationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ public class AuthenticationService {
public boolean login(String email, String password) {
UserService userService = new UserService();
User user = userService.findByEmail(email);

if (user == null) {
return false;
}

if (password.equals(user.getPassword())) {
return true;
}

return false;
return user != null && user.getPassword().equals(password);
}
}

0 comments on commit fb9f0e3

Please sign in to comment.