From ce743ce79ec975fab11281d7959fccdf913a778b Mon Sep 17 00:00:00 2001 From: j2blake Date: Thu, 7 Jul 2011 15:53:58 +0000 Subject: [PATCH] NIHVIVO-2819 Profile matching wasn't working when creating a new account. --- .../accounts/admin/ajax/ExternalAuthChecker.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/ajax/ExternalAuthChecker.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/ajax/ExternalAuthChecker.java index 508c7fbcf..e81f1c6bf 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/ajax/ExternalAuthChecker.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/ajax/ExternalAuthChecker.java @@ -26,8 +26,11 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; * Is somebody already using it (other than ourselves)? Does it match an * existing Profile? Neither? * - * If the userAccountUri or the externalAuthId is empty, or if there is any - * error, say "neither". + * If we are creating a new account, the userAccountUri will be empty, so if + * someone is using the externalAuthID, their URI won't match ours, which is + * what we want. + * + * If the externalAuthId is empty, or if there is any error, say "neither". */ class ExternalAuthChecker extends AjaxResponder { private static final Log log = LogFactory.getLog(ExternalAuthChecker.class); @@ -97,11 +100,6 @@ class ExternalAuthChecker extends AjaxResponder { } private void checkForMatchingProfile() { - if (userAccountUri.isEmpty()) { - log.debug("userAccountUri is empty"); - return; - } - List inds = SelfEditingConfiguration.getBean(vreq) .getAssociatedIndividuals(indDao, externalAuthId); if (inds.isEmpty()) {