From 7dd56835df8dc0e50ce4480a2319236bd95fa8b2 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Tue, 27 Aug 2013 12:06:38 +0200 Subject: [PATCH] Fix auth.multi updateUserObject call in user-choice mode. --- core/src/plugins/auth.multi/class.multiAuthDriver.php | 10 +++++++++- core/src/plugins/core.conf/class.AbstractAjxpUser.php | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/plugins/auth.multi/class.multiAuthDriver.php b/core/src/plugins/auth.multi/class.multiAuthDriver.php index 545f502f63..0269a759ac 100644 --- a/core/src/plugins/auth.multi/class.multiAuthDriver.php +++ b/core/src/plugins/auth.multi/class.multiAuthDriver.php @@ -234,9 +234,17 @@ function listUsers($baseGroup="/"){ function updateUserObject(&$userObject){ $s = $this->getAuthScheme($userObject->getId()); - if(isSet($this->drivers[$s])){ + $test = $this->extractRealId($userObject->getId()); + if($test != $userObject->getId()) { + $restore = $userObject->getId(); + $userObject->setId($test); + } + if(!empty($s) && isSet($this->drivers[$s])){ $this->drivers[$s]->updateUserObject($userObject); + }else if(!empty($this->currentDriver) && isSet($this->drivers[$this->currentDriver])){ + $this->drivers[$this->currentDriver]->updateUserObject($userObject); } + if(isSet($restore)) $userObject->setId($restore); } /** diff --git a/core/src/plugins/core.conf/class.AbstractAjxpUser.php b/core/src/plugins/core.conf/class.AbstractAjxpUser.php index dffaed5fae..4d1ed81b14 100644 --- a/core/src/plugins/core.conf/class.AbstractAjxpUser.php +++ b/core/src/plugins/core.conf/class.AbstractAjxpUser.php @@ -106,6 +106,9 @@ function getId(){ return $this->id; } + function setId($id){ + $this->id = $id ; + } /** * @return bool */