Better support for MAIN_AUTHENTICATION_POST_METHOD

This commit is contained in:
Laurent Destailleur 2018-03-16 19:29:22 +01:00
parent e323084cf8
commit cfeb0dccfe

View File

@ -502,7 +502,7 @@ if (! defined('NOLOGIN'))
$allowedmethodtopostusername = 2;
if (defined('MAIN_AUTHENTICATION_POST_METHOD')) $allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD');
$usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username","alpha",$allowedmethodtopostusername));
$passwordtotest = GETPOST('password','none',2);
$passwordtotest = GETPOST('password','none',$allowedmethodtopostusername);
$entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : (!empty($conf->entity) ? $conf->entity : 1));
// Define if we received data to test the login.