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) {
|
public void setUnlogged(String user) {
|
||||||
Connection con = null;
|
Connection con = null;
|
||||||
PreparedStatement pst = null;
|
PreparedStatement pst = null;
|
||||||
try {
|
if (user != null)
|
||||||
con = makeSureConnectionIsReady();
|
try {
|
||||||
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnLogged + "=? WHERE " + columnName + "=?;");
|
con = makeSureConnectionIsReady();
|
||||||
pst.setInt(1, 0);
|
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnLogged + "=? WHERE " + columnName + "=?;");
|
||||||
pst.setString(2, user);
|
pst.setInt(1, 0);
|
||||||
pst.executeUpdate();
|
pst.setString(2, user);
|
||||||
} catch (SQLException ex) {
|
pst.executeUpdate();
|
||||||
ConsoleLogger.showError(ex.getMessage());
|
} catch (SQLException ex) {
|
||||||
return;
|
ConsoleLogger.showError(ex.getMessage());
|
||||||
} catch (TimeoutException ex) {
|
return;
|
||||||
ConsoleLogger.showError(ex.getMessage());
|
} catch (TimeoutException ex) {
|
||||||
return;
|
ConsoleLogger.showError(ex.getMessage());
|
||||||
} finally {
|
return;
|
||||||
close(pst);
|
}
|
||||||
close(con);
|
finally {
|
||||||
}
|
close(pst);
|
||||||
|
close(con);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user