mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSsession: fix saving context info method to keep existing other info
This commit is contained in:
parent
db491f51e7
commit
069dac2afe
1 changed files with 18 additions and 3 deletions
|
@ -878,7 +878,7 @@ class LSsession {
|
|||
self :: loadLSprofiles();
|
||||
self :: loadLSaccess();
|
||||
self :: loadLSaddonsViewsAccess();
|
||||
$_SESSION['LSsession']=self :: getContextInfos();
|
||||
self :: saveContextInfos();
|
||||
}
|
||||
|
||||
LStemplate :: assign('LSsession_username',self :: getLSuserObject() -> getDisplayName());
|
||||
|
@ -966,7 +966,7 @@ class LSsession {
|
|||
self :: loadLSaddonsViewsAccess();
|
||||
LStemplate :: assign('LSsession_username',self :: getLSuserObject() -> getDisplayName());
|
||||
LStemplate :: assign('globalSearch', self :: globalSearch());
|
||||
$_SESSION['LSsession']=self :: getContextInfos();
|
||||
self :: saveContextInfos();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1260,6 +1260,21 @@ class LSsession {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save context information in PHP session
|
||||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private static function saveContextInfos() {
|
||||
$_SESSION['LSsession'] = (
|
||||
isset($_SESSION['LSsession']) && is_array($_SESSION['LSsession'])?
|
||||
array_merge($_SESSION['LSsession'], self :: getContextInfos()):
|
||||
self :: getContextInfos()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve connected user LSobject (as reference)
|
||||
*
|
||||
|
@ -1354,7 +1369,7 @@ class LSsession {
|
|||
if(self :: loadLSprofiles()) {
|
||||
self :: loadLSaccess();
|
||||
self :: loadLSaddonsViewsAccess();
|
||||
$_SESSION['LSsession']=self :: getContextInfos();
|
||||
self :: saveContextInfos();
|
||||
self :: log_debug("changeAuthUser(): authenticated user successfully updated.");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue