Skip to content

Commit 9d92543

Browse files
committed
Fixed a bug in getUser
1 parent 6240f48 commit 9d92543

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/UserDatabase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public void createUser(String username, String password, String email, String ty
6363
// To be edited to get user from the array format rather than the serialized format.
6464
public User getUser(String username) {
6565
User ans = null;
66-
for (int i = 0; i < (this.getList().size()); i++) {
67-
if (this.getList().get(i).getUsername().equals(username)) {
68-
ans = this.getList().get(i);
66+
for (int i = 0; i < (this.accountList.size()); i++) {
67+
if (this.accountList.get(i).getUsername().equals(username)) {
68+
ans = this.accountList.get(i);
6969
}
7070
}
7171
return ans;

0 commit comments

Comments
 (0)