diff options
author | Ugnich Anton | 2014-07-15 16:56:38 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-07-15 16:56:38 +0700 |
commit | b67b2f126af0c410cdb5b1a925d19b5d2cc5b2b2 (patch) | |
tree | 203acd2825fad6a482f923ad78b20448427510fb /src/com/juick/server/UserQueries.java | |
parent | bddf6ce9dd9b9a1ed4b57df78ca1dcb3ed5a4bdd (diff) |
User.Banned
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); |