Skip to content
Snippets Groups Projects
Commit 7b9531a6 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

fix : bug #174 redirect_groupbasket session array

parent 5219595e
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ class security extends dbquery ...@@ -93,7 +93,7 @@ class security extends dbquery
$array = array(); $array = array();
$error = ''; $error = '';
$uc = new users_controler(); $uc = new users_controler();
// #TODO : Not usefull anymore, loginmode field is always in users table // #TODO : Not usefull anymore, loginmode field is always in users table
//Compatibility test, if loginmode column doesn't exists, Maarch can't crash //Compatibility test, if loginmode column doesn't exists, Maarch can't crash
if ($this->test_column($_SESSION['tablename']['users'], 'loginmode')) { if ($this->test_column($_SESSION['tablename']['users'], 'loginmode')) {
if ($method == 'activex') { if ($method == 'activex') {
...@@ -141,7 +141,7 @@ class security extends dbquery ...@@ -141,7 +141,7 @@ class security extends dbquery
'cookie_date', date('Y-m-d') . ' ' . date('H:m:i') 'cookie_date', date('Y-m-d') . ' ' . date('H:m:i')
); );
} }
// #TODO : usefull ? // #TODO : usefull ?
$uc->save($user, 'up'); $uc->save($user, 'up');
setcookie( setcookie(
'maarch', 'UserId=' . $array['UserId'] . '&key=' 'maarch', 'UserId=' . $array['UserId'] . '&key='
...@@ -161,23 +161,26 @@ class security extends dbquery ...@@ -161,23 +161,26 @@ class security extends dbquery
$core_tools = new core_tools(); $core_tools = new core_tools();
$business_app_tools->load_app_var_session($array); $business_app_tools->load_app_var_session($array);
$core_tools->load_var_session($_SESSION['modules'], $array); $core_tools->load_var_session($_SESSION['modules'], $array);
/************Temporary fix*************/ /************Temporary fix*************/
// #TODO : revoir les functions load_var_session dans class_modules_tools pour ne plus charger en session les infos // #TODO : revoir les functions load_var_session dans class_modules_tools pour ne plus charger en session les infos
if (isset($_SESSION['user']['baskets'])) { if (isset($_SESSION['user']['baskets'])) {
$array['baskets'] = $_SESSION['user']['baskets']; $array['baskets'] = $_SESSION['user']['baskets'];
} }
if (isset($_SESSION['user']['entities'])) { if (isset($_SESSION['user']['entities'])) {
$array['entities'] = $_SESSION['user']['entities']; $array['entities'] = $_SESSION['user']['entities'];
} }
if (isset($_SESSION['user']['primaryentity'])) { if (isset($_SESSION['user']['primaryentity'])) {
$array['primaryentity'] = $_SESSION['user']['primaryentity']; $array['primaryentity'] = $_SESSION['user']['primaryentity'];
} }
/*************************************/ if (isset($_SESSION['user']['redirect_groupbasket'])) {
$array['redirect_groupbasket'] = $_SESSION['user']['redirect_groupbasket'];
}
/*************************************/
$array['services'] = $serv_controler->loadUserServices( $array['services'] = $serv_controler->loadUserServices(
$array['UserId'] $array['UserId']
); );
if ($_SESSION['history']['userlogin'] == 'true') { if ($_SESSION['history']['userlogin'] == 'true') {
//add new instance in history table for the user's connexion //add new instance in history table for the user's connexion
$hist = new history(); $hist = new history();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment