This commit is contained in:
sgdc3
2017-10-20 00:11:42 +02:00
parent ea824ea3f0
commit 251eca9ccd
2 changed files with 4 additions and 4 deletions
@@ -574,7 +574,7 @@ public class MySQL implements DataSource {
public boolean hasSession(String user) {
String sql = "SELECT " + col.HAS_SESSION + " FROM " + tableName + " WHERE " + col.NAME + "=?;";
try (Connection con = getConnection(); PreparedStatement pst = con.prepareStatement(sql)) {
pst.setString(1, user);
pst.setString(1, user.toLowerCase());
try (ResultSet rs = pst.executeQuery()) {
return rs.next() && (rs.getInt(col.HAS_SESSION) == 1);
}