diff --git a/src/main/java/com/example/cosmos_serversb/models/Users.java b/src/main/java/com/example/cosmos_serversb/models/Users.java index c7248aa..a640ab3 100644 --- a/src/main/java/com/example/cosmos_serversb/models/Users.java +++ b/src/main/java/com/example/cosmos_serversb/models/Users.java @@ -75,7 +75,7 @@ session.beginTransaction(); List usersList = session.createQuery( "from User" ).list(); for ( User user : (List) usersList ) { - if(user.getuId() == uId){ + if (user.getuId().equals(uId)) { user.setName(name); if(iconImage != null) { user.setIconUri(iconImage); @@ -147,7 +147,7 @@ session.beginTransaction(); List usersList = session.createQuery( "from logout" ).list(); for ( User user : (List) usersList ) { - if (user.getuId() == uId) { + if (user.getuId().equals(uId)) { if (Users.getInstance().getUserByToken(token).uId == null) { return DeleteResult.FAILURE; } else {