mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-04 09:40:05 +01:00
Push !
This commit is contained in:
parent
fba07fa7e5
commit
1a499150c8
@ -948,22 +948,24 @@ public class MySQLThread extends Thread implements DataSource {
|
||||
public void setUnlogged(String user) {
|
||||
Connection con = null;
|
||||
PreparedStatement pst = null;
|
||||
try {
|
||||
con = makeSureConnectionIsReady();
|
||||
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnLogged + "=? WHERE " + columnName + "=?;");
|
||||
pst.setInt(1, 0);
|
||||
pst.setString(2, user);
|
||||
pst.executeUpdate();
|
||||
} catch (SQLException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
return;
|
||||
} catch (TimeoutException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
return;
|
||||
} finally {
|
||||
close(pst);
|
||||
close(con);
|
||||
}
|
||||
if (user != null)
|
||||
try {
|
||||
con = makeSureConnectionIsReady();
|
||||
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnLogged + "=? WHERE " + columnName + "=?;");
|
||||
pst.setInt(1, 0);
|
||||
pst.setString(2, user);
|
||||
pst.executeUpdate();
|
||||
} catch (SQLException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
return;
|
||||
} catch (TimeoutException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
return;
|
||||
}
|
||||
finally {
|
||||
close(pst);
|
||||
close(con);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user