diff options
Diffstat (limited to 'src/com/juick/server/UserQueries.java')
-rw-r--r-- | src/com/juick/server/UserQueries.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/juick/server/UserQueries.java b/src/com/juick/server/UserQueries.java index 5c1aaccf..d1313715 100644 --- a/src/com/juick/server/UserQueries.java +++ b/src/com/juick/server/UserQueries.java @@ -87,13 +87,14 @@ public class UserQueries { PreparedStatement stmt = null; ResultSet rs = null; try { - stmt = sql.prepareStatement("SELECT nick FROM users WHERE id=?"); + stmt = sql.prepareStatement("SELECT nick,banned FROM users WHERE id=?"); stmt.setInt(1, uid); rs = stmt.executeQuery(); if (rs.first()) { user = new com.juick.User(); user.UID = uid; user.UName = rs.getString(1); + user.Banned = rs.getBoolean(2); } } catch (SQLException e) { System.err.println(e); @@ -109,13 +110,14 @@ public class UserQueries { PreparedStatement stmt = null; ResultSet rs = null; try { - stmt = sql.prepareStatement("SELECT id,nick FROM users WHERE nick=?"); + stmt = sql.prepareStatement("SELECT id,nick,banned FROM users WHERE nick=?"); stmt.setString(1, username); 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); } } catch (SQLException e) { System.err.println(e); |