aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/src/main/java/com/juick/service/UserService.java2
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java14
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Settings.java9
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/settings_main.html6
4 files changed, 1 insertions, 30 deletions
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) {
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 d2b65661..6fa3fd2e 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
@@ -181,15 +181,6 @@ public class Settings {
result = "<p>Error</p>";
}
break;
- case "email":
- String newHash = userService.updateSecretEmail(visitor);
- if (StringUtils.isNotEmpty(newHash)) {
- result = String.format("<p>New secret email: <strong>%s@mail.juick.com</strong></p>" +
- "<p><a href=\"/settings\">Back</a>.</p>", newHash);
- } else {
- throw new HttpBadRequestException();
- }
- break;
case "email-add":
if (!emailService.verifyAddressByCode(visitor.getUid(), request.getParameter("account"))) {
String authCode = UserUtils.generateHash(8);
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html
index 7a95f2a9..e5342229 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html
+++ b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html
@@ -101,11 +101,7 @@
{% endif %}
<p>&nbsp;</p>
<p>You can post to Juick via e-mail. Send your <span style="text-decoration: underline">plain text</span>
- messages to special secret e-mail. You can attach one photo or video file.</p>
- <p>Secret email: {% if ehash is not empty %} <strong>{{ ehash }}</strong> {% else %}-{% endif %}</p>
- <form action="/settings" method="post">
- <p><input type="hidden" name="page" value="email"/><input type="submit" value=" Generate new "/></p>
- </form>
+ messages to <span><a href="mailto:juick@juick.com">juick@juick.com</a></span>. You can attach one photo or video file.</p>
</fieldset>
<fieldset>
<legend style="background: url(//static.juick.com/settings/facebook.png) no-repeat; padding-left: 58px; line-height: 48px;">