NEW : redirect after connection in login page
This commit is contained in:
parent
257fe444af
commit
61d97ccd22
@ -224,6 +224,11 @@ if (!function_exists('dol_loginfunction')) {
|
|||||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions', $parameters); // Note that $action and $object may have been modified by some hooks.
|
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions', $parameters); // Note that $action and $object may have been modified by some hooks.
|
||||||
$moreloginextracontent = $hookmanager->resPrint;
|
$moreloginextracontent = $hookmanager->resPrint;
|
||||||
|
|
||||||
|
//Redirect after connection
|
||||||
|
$parameters = array('entity' => GETPOST('entity', 'int'));
|
||||||
|
$reshook = $hookmanager->executeHooks('redirectAfterConnection', $parameters); // Note that $action and $object may have been modified by some hooks.
|
||||||
|
$php_self = $hookmanager->resPrint;
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
$login = (!empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username", "alpha") ? GETPOST("username", "alpha") : $demologin));
|
$login = (!empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username", "alpha") ? GETPOST("username", "alpha") : $demologin));
|
||||||
$password = $demopassword;
|
$password = $demopassword;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ if (!empty($conf->dol_use_jmobile)) {
|
|||||||
$conf->use_javascript_ajax = 1;
|
$conf->use_javascript_ajax = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$php_self = dol_escape_htmltag($_SERVER['PHP_SELF']);
|
$php_self = empty($php_self) ? dol_escape_htmltag($_SERVER['PHP_SELF']) : $php_self;
|
||||||
$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
|
$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
|
||||||
if (!preg_match('/mainmenu=/', $php_self)) {
|
if (!preg_match('/mainmenu=/', $php_self)) {
|
||||||
$php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
|
$php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user