Fix for XenForo

This commit is contained in:
Xephi 2014-06-16 01:11:22 +02:00
parent 630271dfe8
commit 800ecb16a0
2 changed files with 12 additions and 0 deletions

View File

@ -209,6 +209,7 @@ public class MySQLDataSource implements DataSource {
rs.close();
pst = con.prepareStatement("SELECT * FROM xf_user_authenticate WHERE " + columnID + "=?;");
pst.setInt(1, id);
rs = pst.executeQuery();
if (rs.next()) {
Blob blob = rs.getBlob("data");
byte[] bytes = blob.getBytes(1, (int) blob.length());
@ -435,6 +436,11 @@ public class MySQLDataSource implements DataSource {
blob.setBytes(1, bytes);
pst.setBlob(1, blob);
pst.setInt(2, id);
pst.executeUpdate();
pst = con.prepareStatement("UPDATE xf_user_authenticate SET scheme_class=? WHERE " + columnID + "=?;");
pst.setString(1, "XenForo_Authentication_Core12");
pst.setInt(2, id);
pst.executeUpdate();
}
}
} catch (SQLException ex) {

View File

@ -238,6 +238,7 @@ public class MySQLThread extends Thread implements DataSource {
rs.close();
pst = con.prepareStatement("SELECT * FROM xf_user_authenticate WHERE " + columnID + "=?;");
pst.setInt(1, id);
rs = pst.executeQuery();
if (rs.next()) {
Blob blob = rs.getBlob("data");
byte[] bytes = blob.getBytes(1, (int) blob.length());
@ -464,6 +465,11 @@ public class MySQLThread extends Thread implements DataSource {
blob.setBytes(1, bytes);
pst.setBlob(1, blob);
pst.setInt(2, id);
pst.executeUpdate();
pst = con.prepareStatement("UPDATE xf_user_authenticate SET scheme_class=? WHERE " + columnID + "=?;");
pst.setString(1, "XenForo_Authentication_Core12");
pst.setInt(2, id);
pst.executeUpdate();
}
}
} catch (SQLException ex) {