diff options
author | Vitaly Takmazov | 2015-12-16 13:24:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-12-16 13:24:29 +0300 |
commit | 512d0b353f28e241937be3fa146617ba8ff97c9c (patch) | |
tree | e4f2f2a8ea2f7386f1ad222a7f03cb45b934ee3a /src/main/java/com/juick/server/UserQueries.java | |
parent | 79e48598873f6a2b4ec1aa850e310a689d862afa (diff) |
getUsersByHash: fetch users.banned field
Diffstat (limited to 'src/main/java/com/juick/server/UserQueries.java')
-rw-r--r-- | src/main/java/com/juick/server/UserQueries.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/UserQueries.java b/src/main/java/com/juick/server/UserQueries.java index 470f3c8e..95944ce0 100644 --- a/src/main/java/com/juick/server/UserQueries.java +++ b/src/main/java/com/juick/server/UserQueries.java @@ -281,13 +281,14 @@ public class UserQueries { PreparedStatement stmt = null; ResultSet rs = null; try { - stmt = sql.prepareStatement("SELECT logins.user_id,users.nick FROM logins INNER JOIN users ON logins.user_id=users.id WHERE logins.hash=?"); + stmt = sql.prepareStatement("SELECT logins.user_id,users.nick, users.banned FROM logins INNER JOIN users ON logins.user_id=users.id WHERE logins.hash=?"); stmt.setString(1, hash); rs = stmt.executeQuery(); if (rs.first()) { user = new com.juick.User(); user.UID = rs.getInt(1); user.UName = rs.getString(2); + user.Banned = rs.getBoolean(3); user.AuthHash = hash; } } catch (SQLException e) { |