if (aStorage == null)
logger.warn("ModuleUsers(): StorageObject was null!");
- theStorage = aStorage;
+ storage = aStorage;
}
/**
* @param password The password
* @return The authenticated user, or <code>null</code> if the user
* doesn't exist, or the supplied password is invalid.
- * @throws ModuleException
+ * @throws ModuleExc
*/
public EntityUsers getUserForLogin(String user, String password) throws ModuleExc, ModuleFailure {
if (userList != null && userList.getCount() == 1) {
EntityUsers result = (EntityUsers) userList.elementAt(0);
- if (result.getValue("is_disabled") == null ||
- result.getValue("is_disabled").equals("0"))
+ if (result.getFieldValue("is_disabled") == null ||
+ result.getFieldValue("is_disabled").equals("0"))
return result;
-
}
return null;
public boolean checkUserPassword(EntityUsers aUser, String aPassword) throws ModuleExc, ModuleFailure {
try {
- return aUser.getValue("password").equals(MirGlobal.localizer().adminInterface().makePasswordDigest(aPassword));
+ return aUser.getFieldValue("password").equals(MirGlobal.localizer().adminInterface().makePasswordDigest(aPassword));
}
catch (Throwable t) {
throw new ModuleFailure(t);
try {
String sql = "update webdb_users set lastlogin=now() where id = " + aUser.getId();
- theStorage.executeUpdate(sql);
+ storage.executeUpdate(sql);
}
catch (Throwable t) {
- throw new ModuleFailure(t);
+// no propagation of this error for now, to allow mir to still function
+// with older db schemas
+// throw new ModuleFailure(t);
}
}
}
\ No newline at end of file