Merge with 1d70672bd78442ecb242f3f622e54a96df552300

This commit is contained in:
Elaine Tan 2012-10-03 13:04:28 +08:00
commit bc79195628
1 changed files with 10 additions and 1 deletions

View File

@ -1372,6 +1372,7 @@ public class Login
}
}
boolean validButLocked = false;
for (MUser user : users) {
if (clientsValidated.contains(user.getAD_Client_ID())) {
log.severe("Two users with password with the same name/email combination on same tenant: " + app_user);
@ -1387,7 +1388,10 @@ public class Login
}
if (valid ) {
if (user.isLocked())
{
validButLocked = true;
continue;
}
if (user.isExpired())
isPasswordExpired = true;
@ -1462,6 +1466,11 @@ public class Login
log.severe("Failed to update user record with date last login");
}
}
else if (validButLocked)
{
// User account ({0}) is locked, please contact the system administrator
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
}
else
{
boolean foundLockedAccount = false;