Skip to content

Commit 6240f48

Browse files
committed
Added UserExists with one parameter
1 parent 41d5d1c commit 6240f48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/UserDatabase.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ public boolean UserExists(String username, String email) {
2929
return false;
3030
}
3131

32+
@Override
33+
public boolean UserExists(String username) {
34+
for(User user: this.accountList){
35+
if(user.getUsername().equals(username)){
36+
return true;
37+
}
38+
}
39+
return false;
40+
}
41+
3242
// Creates a new user with a username and password, and an email address
3343
// The order is username, password, email address, verification status, status
3444
//

0 commit comments

Comments
 (0)