issue #0001685 : Use response data to set the session again and keep password from session

This commit is contained in:
Michael RICOIS 2013-08-19 09:11:16 +00:00
parent 5445c635a6
commit 7a2593fd00

View File

@ -18,13 +18,18 @@ class Scores_Utilisateur
/**
* Récupére les valeurs du profil depuis le webservice
* @param stdClass $InfosLogin
* @params string $password
* @return stdClass
*/
public function updateProfil($InfosLogin)
public function updateProfil($InfosLogin, $password = null)
{
$identity = new stdClass;
$identity->username = $login;
$identity->password = $password;
$identity->username = $InfosLogin->result->login;
if ($password === null) {
$identity->password = $this->identity->password;
} else {
$identity->password = $password;
}
$identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil;
$identity->pref = $InfosLogin->result->pref;
@ -56,6 +61,8 @@ class Scores_Utilisateur
$identity->langtmp = $lang;
$identity->browser = $this->getBrowserInfo();
$this->identity = $identity;
return $identity;
}