mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 11:15:19 +01:00
Fix unclosed Statement object.
This commit is contained in:
parent
35d73b2d4a
commit
ee3fe45d7f
@ -283,10 +283,9 @@ public class MySQL implements DataSource {
|
||||
if (!rs.next()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String salt = !columnSalt.isEmpty() ? rs.getString(columnSalt) : "";
|
||||
int group = !salt.isEmpty() && !columnGroup.isEmpty() ? rs.getInt(columnGroup) : -1;
|
||||
|
||||
int id = rs.getInt(columnID);
|
||||
pAuth = PlayerAuth.builder()
|
||||
.name(rs.getString(columnName))
|
||||
.realName(rs.getString(columnRealName))
|
||||
@ -301,11 +300,9 @@ public class MySQL implements DataSource {
|
||||
.salt(salt)
|
||||
.groupId(group)
|
||||
.build();
|
||||
|
||||
if (Settings.getPasswordHash == HashAlgorithm.XENFORO) {
|
||||
int id = rs.getInt(columnID);
|
||||
rs.close();
|
||||
pst.close();
|
||||
if (Settings.getPasswordHash == HashAlgorithm.XENFORO) {
|
||||
pst = con.prepareStatement("SELECT data FROM xf_user_authenticate WHERE " + columnID + "=?;");
|
||||
pst.setInt(1, id);
|
||||
rs = pst.executeQuery();
|
||||
|
Loading…
Reference in New Issue
Block a user