Commit 7106026b authored by Snaiker's avatar Snaiker

Hide mail

parent 4cd0b8bf
......@@ -54,7 +54,7 @@ public class ModToolManager {
if (userId <= 0)
return;
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT users.*, users_settings.*, permissions.rank_name, permissions.id as rank_id FROM users INNER JOIN users_settings ON users.id = users_settings.user_id INNER JOIN permissions ON permissions.id = users.rank WHERE users.id = ? LIMIT 1")) {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT users.*, users_settings.*, permissions.rank_name, permissions.acc_hide_mail AS hide_mail, permissions.id AS rank_id FROM users INNER JOIN users_settings ON users.id = users_settings.user_id INNER JOIN permissions ON permissions.id = users.rank WHERE users.id = ? LIMIT 1")) {
statement.setInt(1, userId);
try (ResultSet set = statement.executeQuery()) {
while (set.next()) {
......
......@@ -58,7 +58,7 @@ public class ModToolUserInfoComposer extends MessageComposer {
this.response.appendString(""); //Last Purchase Timestamp
this.response.appendInt(this.set.getInt("user_id")); //Personal Identification #
this.response.appendInt(0); // Number of account bans
this.response.appendString(this.set.getString("mail"));
this.response.appendString(this.set.getBoolean("hide_mail") ? "" : this.set.getString("mail"));
this.response.appendString("Rank (" + this.set.getInt("rank_id") + "): " + this.set.getString("rank_name")); //user_class_txt
ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment