aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Settings.java
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-14 16:00:58 +0700
committerGravatar Vitaly Takmazov2016-11-15 09:49:13 +0300
commitf1f61379cab08ecff28e125cba3aa68b78fd66d7 (patch)
tree95a0cc659ff850927b30c00ba7a39eadf90ec2c7 /juick-www/src/main/java/com/juick/www/Settings.java
parentd03e8b19d346563afec5fb2b6b9c9dcea68040e0 (diff)
bugfixes
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Settings.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Settings.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Settings.java b/juick-www/src/main/java/com/juick/www/Settings.java
index 8fe14615..6be16acc 100644
--- a/juick-www/src/main/java/com/juick/www/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/Settings.java
@@ -23,6 +23,7 @@ import com.juick.server.TagQueries;
import com.juick.server.UserQueries;
import com.juick.server.helpers.NotifyOpts;
import com.juick.server.helpers.UserInfo;
+import com.juick.util.UserUtils;
import com.mitchellbosecke.pebble.error.PebbleException;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
import net.coobird.thumbnailator.Thumbnails;
@@ -199,7 +200,7 @@ public class Settings {
sql.queryForObject("SELECT authcode FROM auth WHERE user_id=? AND protocol='email' " +
"AND account=?", String.class, visitor.getUID(), request.getParameter("account"));
} catch (EmptyResultDataAccessException e) {
- String authCode = UserQueries.generateHash(8);
+ String authCode = UserUtils.generateHash(8);
if (sql.update("INSERT INTO auth(user_id,protocol,account,authcode) VALUES (?,'email',?,?)",
visitor.getUID(), request.getParameter("account"), authCode) > 0) {
Session session = Session.getDefaultInstance(System.getProperties());