diff --git a/src/main/java/cactusServer/models/Accounts.java b/src/main/java/cactusServer/models/Accounts.java index 092d95b..357c8a4 100644 --- a/src/main/java/cactusServer/models/Accounts.java +++ b/src/main/java/cactusServer/models/Accounts.java @@ -42,7 +42,11 @@ } public Account loginAccount(String userID,String userPass) { - return Accounts.getInstance().getAccount(userID); + if(idList.contains(userID) && getAccount(userID).getPass().equals(userPass)) { + return getAccount(userID); + }else { + return null; + } } public String logoutAccount(String userID) {