diff --git a/Havana-Server/src/main/java/org/alexdev/havana/dao/mysql/PlayerDao.java b/Havana-Server/src/main/java/org/alexdev/havana/dao/mysql/PlayerDao.java index 6fc898d..1444ae8 100644 --- a/Havana-Server/src/main/java/org/alexdev/havana/dao/mysql/PlayerDao.java +++ b/Havana-Server/src/main/java/org/alexdev/havana/dao/mysql/PlayerDao.java @@ -487,26 +487,6 @@ public class PlayerDao { } } - public static void setAuthToken(int userId, String authTicket, long updatedAt) { - Connection sqlConnection = null; - PreparedStatement preparedStatement = null; - - try { - sqlConnection = Storage.getStorage().getConnection(); - preparedStatement = Storage.getStorage().prepare("UPDATE users SET authentication_key = ?, authentication_key_date = ? WHERE id = ? LIMIT 1", sqlConnection); - preparedStatement.setString(1, authTicket); - preparedStatement.setLong(2, updatedAt); - preparedStatement.setInt(3, userId); - preparedStatement.execute(); - - } catch (Exception e) { - Storage.logError(e); - } finally { - Storage.closeSilently(preparedStatement); - Storage.closeSilently(sqlConnection); - } - } - /** * Reset SSO ticket * Protects against replay attacks diff --git a/Havana-Web/src/main/java/org/alexdev/http/controllers/site/ProfileController.java b/Havana-Web/src/main/java/org/alexdev/http/controllers/site/ProfileController.java index 51162d1..0219fe6 100644 --- a/Havana-Web/src/main/java/org/alexdev/http/controllers/site/ProfileController.java +++ b/Havana-Web/src/main/java/org/alexdev/http/controllers/site/ProfileController.java @@ -445,15 +445,12 @@ public class ProfileController { boolean wordFilterEnabled = !webConnection.post().getString("wordFilterSetting").equals("false"); boolean allowFriendRequests = webConnection.post().getString("allowFriendRequests").equals("true"); boolean allowFriendStalking = webConnection.post().getString("followFriendSetting").equals("true"); - boolean shockwavePreferred = webConnection.post().getString("clientpreference").equals("SHOCKWAVE"); - String authToken = webConnection.session().getString("authenticationToken"); if (motto.length() > 32) { motto = motto.substring(0, 32); } SessionDao.savePreferences(motto, profileVisibility, onlineStatusVisibility, wordFilterEnabled, allowFriendRequests, allowFriendStalking, userId); - PlayerDao.setAuthToken(userId, authToken, DateUtil.getCurrentTimeSeconds()); webConnection.session().set("settings.saved.successfully", "true"); webConnection.redirect("/profile?tab=2");