From 679b8a138cf0302144359f1199a57e920c4e71d8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 19 Apr 2017 09:29:23 +0300 Subject: juick-www: fix signup --- juick-www/src/main/java/com/juick/www/controllers/SignUp.java | 6 +++--- 1 file 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); -- cgit v1.2.3