From b67b2f126af0c410cdb5b1a925d19b5d2cc5b2b2 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Tue, 15 Jul 2014 16:56:38 +0700 Subject: User.Banned --- src/com/juick/server/UserQueries.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/com/juick/server/UserQueries.java') 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); -- cgit v1.2.3