update realName
This commit is contained in:
@@ -70,6 +70,7 @@ public class CacheDataSource implements DataSource {
|
||||
if (cache.containsKey(auth.getNickname())) {
|
||||
cache.get(auth.getNickname()).setIp(auth.getIp());
|
||||
cache.get(auth.getNickname()).setLastLogin(auth.getLastLogin());
|
||||
cache.get(auth.getNickname()).setRealName(auth.getRealName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -517,10 +517,11 @@ public class MySQL implements DataSource {
|
||||
PreparedStatement pst = null;
|
||||
try {
|
||||
con = makeSureConnectionIsReady();
|
||||
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnIp + "=?, " + columnLastLogin + "=? WHERE LOWER(" + columnName + ")=?;");
|
||||
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnIp + "=?, " + columnLastLogin + "=?, " + columnRealName + "=? WHERE LOWER(" + columnName + ")=?;");
|
||||
pst.setString(1, auth.getIp());
|
||||
pst.setLong(2, auth.getLastLogin());
|
||||
pst.setString(3, auth.getNickname());
|
||||
pst.setString(3, auth.getRealName());
|
||||
pst.setString(4, auth.getNickname());
|
||||
pst.executeUpdate();
|
||||
} catch (SQLException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user