$action = ''; $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode' => $dol_authmode, 'dol_loginmesg' => $_SESSION["dol_loginmesg"]); $reshook = $hookmanager->executeHooks('afterLoginFailed', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { $error++; } // Note: exit is done in next chapter } } // End test login / passwords if (!$login || in_array('ldap', $authmode) && empty($passwordtotest)) { // We show login page dol_syslog("--- Access to " . $_SERVER["PHP_SELF"] . " showing the login form and exit"); dol_loginfunction($langs, $conf, !empty($mysoc) ? $mysoc : ''); exit; } $resultFetchUser = $user->fetch('', $login); if ($resultFetchUser <= 0) { dol_syslog('User not found, connexion refused'); session_destroy(); session_name($sessionname); session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) { $langs->load('main'); $langs->load('errors'); $user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login=' . $login; $_SESSION["dol_loginmesg"] = $langs->trans("ErrorCantLoadUserFromDolibarrDatabase", $login); }
$result = $interface->run_triggers('USER_LOGIN_FAILED', $user, $user, $langs, $conf, GETPOST("username", "alpha", 2)); if ($result < 0) { $error++; } // Fin appel triggers } } // End test login / passwords if (!$login) { // We show login page if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined include_once(DOL_DOCUMENT_ROOT . "/core/class/translate.class.php"); $langs = new Translate("", $conf); } dol_loginfunction($langs, $conf, $mysoc); exit; } $user = new User($db); $resultFetchUser = $user->fetch("org.couchdb.user:" . $login); /* if ($resultFetchUser <= 0) { dol_syslog('User not found, connexion refused'); session_destroy(); session_name($sessionname); session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) {