mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
NEW : redirect after connection in login page
This commit is contained in:
@@ -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.
|
||||
$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 = (!empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username", "alpha") ? GETPOST("username", "alpha") : $demologin));
|
||||
$password = $demopassword;
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!empty($conf->dol_use_jmobile)) {
|
||||
$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"]) : '';
|
||||
if (!preg_match('/mainmenu=/', $php_self)) {
|
||||
$php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
|
||||
|
||||
Reference in New Issue
Block a user