From fdc9f02b8533ff07b5f260335db2011b2789dd92 Mon Sep 17 00:00:00 2001 From: j2blake Date: Fri, 8 Jul 2011 14:38:02 +0000 Subject: [PATCH] NIHVIVO-2819 If a user logs in with external credentials to an account that is not ACTIVE, activate it. --- .../webapp/controller/authenticate/BasicAuthenticator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/authenticate/BasicAuthenticator.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/authenticate/BasicAuthenticator.java index 7b43b71c1..dcf8d4244 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/authenticate/BasicAuthenticator.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/authenticate/BasicAuthenticator.java @@ -18,6 +18,7 @@ import edu.cornell.mannlib.vedit.beans.LoginStatusBean; import edu.cornell.mannlib.vedit.beans.LoginStatusBean.AuthenticationSource; import edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers; import edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel; +import edu.cornell.mannlib.vitro.webapp.beans.UserAccount.Status; import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.beans.SelfEditingConfiguration; import edu.cornell.mannlib.vitro.webapp.beans.UserAccount; @@ -139,6 +140,7 @@ public class BasicAuthenticator extends Authenticator { private void recordLoginOnUserRecord(UserAccount userAccount) { userAccount.setLoginCount(userAccount.getLoginCount() + 1); userAccount.setLastLoginTime(new Date().getTime()); + userAccount.setStatus(Status.ACTIVE); getUserAccountsDao().updateUserAccount(userAccount); }