diff options
author | Vitaly Takmazov | 2017-04-19 09:29:23 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-04-19 09:29:23 +0300 |
commit | 679b8a138cf0302144359f1199a57e920c4e71d8 (patch) | |
tree | 3cc22a6e693e78c6f79153b9fb6a837d81c2dc0b | |
parent | c50353b4397e03ddaeb8039681d19cfc46565f2e (diff) |
juick-www: fix signup
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/SignUp.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/SignUp.java b/juick-www/src/main/java/com/juick/www/controllers/SignUp.java index 4746292b..f459f3c0 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/SignUp.java +++ b/juick-www/src/main/java/com/juick/www/controllers/SignUp.java @@ -94,8 +94,8 @@ public class SignUp { @RequestParam String type, @RequestParam String hash, @RequestParam String action, - @RequestParam String username, - @RequestParam String password) { + @RequestParam(required = false) String username, + @RequestParam(required = false) String password) { com.juick.User visitor = UserUtils.getCurrentUser(); int uid = 0; @@ -145,7 +145,7 @@ public class SignUp { } } - if (visitor == null) { + if (visitor.getUid() == 0) { hash = userService.getHashByUID(uid); Cookie c = new Cookie("hash", hash); c.setMaxAge(365 * 24 * 60 * 60); |