From a87b218082b7ed383ee57e26e89bc2d0283299f5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Jun 2017 16:26:16 +0300 Subject: drop secret mail feature --- .../src/main/java/com/juick/service/UserService.java | 2 -- .../src/main/java/com/juick/service/UserServiceImpl.java | 14 -------------- 2 files changed, 16 deletions(-) (limited to 'juick-server/src/main/java') diff --git a/juick-server/src/main/java/com/juick/service/UserService.java b/juick-server/src/main/java/com/juick/service/UserService.java index 7f4bb1fe..98786f7d 100644 --- a/juick-server/src/main/java/com/juick/service/UserService.java +++ b/juick-server/src/main/java/com/juick/service/UserService.java @@ -60,8 +60,6 @@ public interface UserService { boolean updatePassword(User user, String newPassword); - String updateSecretEmail(User user); - int getUserOptionInt(int uid, String option, int defaultValue); int setUserOptionInt(int uid, String option, int value); diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java index 1fc72525..1b7cee42 100644 --- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java @@ -362,20 +362,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { getJdbcTemplate().update("UPDATE users SET passw = ? WHERE id = ?", newPassword, user.getUid()) > 0; } - @Transactional - @Override - public String updateSecretEmail(final User user) { - if (user != null) { - String newHash = UserUtils.generateHash(16); - int ret = getJdbcTemplate().update( - "INSERT INTO mail(user_id, hash) VALUES (?, ?) ON DUPLICATE KEY UPDATE hash = ?", - user.getUid(), newHash, newHash); - if (ret > 0) - return newHash; - } - return StringUtils.EMPTY; - } - @Transactional(readOnly = true) @Override public int getUserOptionInt(final int uid, final String option, final int defaultValue) { -- cgit v1.2.3