mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX rename hook to be more explicit and $test = false
This commit is contained in:
parent
43b1be01d9
commit
37193557df
|
|
@ -565,12 +565,15 @@ if (!defined('NOLOGIN'))
|
|||
// Hooks for security access
|
||||
$action = '';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
$parameters = array('dol_authmode'=>$dol_authmode);
|
||||
$reshook = $hookmanager->executeHooks('loginCheckSecurityAccess', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('beforeLoginAuthentication', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$test = false;
|
||||
$error++;
|
||||
}
|
||||
|
||||
// Verification security graphic code
|
||||
if (GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam']))
|
||||
if ($test && GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam']))
|
||||
{
|
||||
$sessionkey = 'dol_antispam_value';
|
||||
$ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code'])));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user