Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added solution to the task. Modified files: AuthenticationService and… #1111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nikolasdymchenko7
Copy link

Added solution to the task.
Modified files: AuthenticationService and UserService

@@ -11,6 +13,15 @@ public class AuthenticationService {
* Return false in any other cases.
*/
public boolean login(String email, String password) {
UserService userService = new UserService();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create object in class level

Comment on lines 19 to 22
if (userByEmail != null) {
if (userByEmail.getEmail().equals(email)
&& userByEmail.getPassword().equals(password)) {
return true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don`t need to check email cause you get this user by email already

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants