From 4034b885d3e934eb45c87b5377579fbbeb909544 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 30 Nov 2018 13:13:05 +0300 Subject: XMPP signup error page --- src/main/java/com/juick/server/www/controllers/SignUp.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/juick/server/www/controllers/SignUp.java b/src/main/java/com/juick/server/www/controllers/SignUp.java index e4ea6958..e33b16cd 100644 --- a/src/main/java/com/juick/server/www/controllers/SignUp.java +++ b/src/main/java/com/juick/server/www/controllers/SignUp.java @@ -96,7 +96,8 @@ public class SignUp { @RequestParam String hash, @RequestParam String action, @RequestParam(required = false) String username, - @RequestParam(required = false) String password) { + @RequestParam(required = false) String password, + ModelMap modelMap) { com.juick.User visitor = UserUtils.getCurrentUser(); int uid = 0; @@ -152,6 +153,10 @@ public class SignUp { emailService.addEmail(uid, email); emailService.deleteAuthCode(hash); } else { + if (type.equals("xmpp")) { + modelMap.addAttribute("result", "XMPP support is disabled for new users"); + return "views/settings_result"; + } throw new HttpBadRequestException(); } } -- cgit v1.2.3