summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-05 18:42:38 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-05 18:42:38 +0000
commit3bdc88e37490530e7339c72c470df261fa2c76fb (patch)
tree451cfc38bad886e0f678f943b3b48e0a7ce2ea95 /src
parentb8fbabe965ed499a6552f5984055a83e0fd39074 (diff)
downloadsemanticscuttle-3bdc88e37490530e7339c72c470df261fa2c76fb.tar.gz
semanticscuttle-3bdc88e37490530e7339c72c470df261fa2c76fb.tar.bz2
make external login work when user changed password externally
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@629 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src')
-rw-r--r--src/SemanticScuttle/Service/AuthUser.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/SemanticScuttle/Service/AuthUser.php b/src/SemanticScuttle/Service/AuthUser.php
index a293af5..0fc0902 100644
--- a/src/SemanticScuttle/Service/AuthUser.php
+++ b/src/SemanticScuttle/Service/AuthUser.php
@@ -160,6 +160,19 @@ class SemanticScuttle_Service_AuthUser extends SemanticScuttle_Service_User
}
//utilize real login method to get longtime cookie support etc.
+ $ok = parent::login($username, $password, $remember);
+ if ($ok) {
+ return $ok;
+ }
+
+ //user must have changed password in external auth.
+ //we need to update the local database.
+ $user = $this->getUserByUsername($username);
+ $this->_updateuser(
+ $user['uId'], 'password',
+ $this->sanitisePassword($password)
+ );
+
return parent::login($username, $password, $remember);
}
@@ -172,7 +185,7 @@ class SemanticScuttle_Service_AuthUser extends SemanticScuttle_Service_User
* @param string $username Username to check
* @param string $password Password to check
*
- * @return boolean If the user has been authenticated or not
+ * @return boolean If the user has been successfully authenticated or not
*/
public function loginAuth($username, $password)
{
@@ -193,8 +206,6 @@ class SemanticScuttle_Service_AuthUser extends SemanticScuttle_Service_User
$username . $GLOBALS['authEmailSuffix']
);
}
- //FIXME: what if the user changed his password?
- //FIXME: what if the user does not need an email domain?
return true;
}