Skip to content

Conversation

@unknownpanic
Copy link

No description provided.

Copy link

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

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

Good job! Let's fix some comments

public boolean login(String email, String password) {
return false;
public static boolean login(String email, String password) {
User user = new User(email, password);

Choose a reason for hiding this comment

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

create UserService as class-level variable
find user by email
user ternary operator in return

* Return <code>null</code> if there is no suitable user
*/
public User findByEmail(String email) {
public static User findByEmail(String email) {

Choose a reason for hiding this comment

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

Suggested change
public static User findByEmail(String email) {
public User findByEmail(String email) {

@unknownpanic unknownpanic changed the title task was solved methods were simplified and optimized Sep 8, 2025
@unknownpanic unknownpanic changed the title methods were simplified and optimized implemented user authentication Sep 8, 2025
Copy link

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

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

see comment

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.

2 participants