aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-04-19 09:29:23 +0300
committerGravatar Vitaly Takmazov2017-04-19 09:29:23 +0300
commit679b8a138cf0302144359f1199a57e920c4e71d8 (patch)
tree3cc22a6e693e78c6f79153b9fb6a837d81c2dc0b /juick-www/src/main/java/com/juick/www
parentc50353b4397e03ddaeb8039681d19cfc46565f2e (diff)
juick-www: fix signup
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/SignUp.java6
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 4746292b9..f459f3c0b 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);