aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Settings.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
index e6e763b1..053a014e 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
@@ -29,7 +29,6 @@ import org.apache.commons.lang3.StringUtils;
import org.imgscalr.Scalr;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -209,9 +208,7 @@ public class Settings {
}
break;
case "email-add":
- try {
- emailService.verifyAddressByCode(visitor.getUid(), request.getParameter("account"));
- } catch (EmptyResultDataAccessException e) {
+ if (!emailService.verifyAddressByCode(visitor.getUid(), request.getParameter("account"))) {
String authCode = UserUtils.generateHash(8);
if (emailService.addVerificationCode(visitor.getUid(), request.getParameter("account"), authCode)) {
Session session = Session.getDefaultInstance(System.getProperties());