-
Notifications
You must be signed in to change notification settings - Fork 996
add login logic #1250
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
base: master
Are you sure you want to change the base?
add login logic #1250
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "ExpandedNodes": [ | ||
| "" | ||
| ], | ||
| "PreviewInSolutionExplorer": false | ||
| } |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file and .vs directory shouldn't be added to git and pushed to github |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "Version": 1, | ||
| "WorkspaceRootPath": "C:\\Users\\sofyh\\Source\\Repos\\jv-oop-lesson-0\\", | ||
| "Documents": [], | ||
| "DocumentGroupContainers": [ | ||
| { | ||
| "Orientation": 0, | ||
| "VerticalTabListWidth": 256, | ||
| "DocumentGroups": [] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,14 @@ public class UserService { | |||||||||||||||||
| * @return - user if his email is equal to passed email. | ||||||||||||||||||
| * Return <code>null</code> if there is no suitable user | ||||||||||||||||||
| */ | ||||||||||||||||||
| public User findByEmail(String email) { | ||||||||||||||||||
| public static User findByEmail(String email) { | ||||||||||||||||||
KhapalSofiia marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||
| for (int i = 0; i < users.length; i++) { | ||||||||||||||||||
| if (users[i].getEmail().equals(email)) { | ||||||||||||||||||
| return users[i]; | ||||||||||||||||||
| } else { | ||||||||||||||||||
| continue; | ||||||||||||||||||
| } | ||||||||||||||||||
|
||||||||||||||||||
| if (users[i].getEmail().equals(email)) { | |
| return users[i]; | |
| } else { | |
| continue; | |
| } | |
| if (user.getEmail().equals(email)) { | |
| return user; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тобто тут краще використати цикл for each замість звичайного for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file and .vs directory shouldn't be added to git and pushed to github