diff options
author | 2018-08-29 15:10:51 +0300 | |
---|---|---|
committer | 2018-08-29 15:10:51 +0300 | |
commit | 61a28570ca25ae789cca09736ddc427e172ac213 (patch) | |
tree | b1f490597d5f2999121310ae479b38e33eb5fb71 /juick-server/src/main/java/com/juick/server/api/Users.java | |
parent | 22514aa83e418770c8f60ea1b5ce943daa2383ef (diff) |
getUserByName is non nullable
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/Users.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Users.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java index c91581a0..237b7ed6 100644 --- a/juick-server/src/main/java/com/juick/server/api/Users.java +++ b/juick-server/src/main/java/com/juick/server/api/Users.java @@ -106,7 +106,7 @@ public class Users { } else { if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); - if (u != null && u.getUid() > 0) { + if (!u.isAnonymous()) { uid = u.getUid(); } } @@ -131,7 +131,7 @@ public class Users { } else { if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); - if (u != null && u.getUid() > 0) { + if (!u.isAnonymous()) { uid = u.getUid(); } } |