54 $this->
login = $aLogin;
86 public function verif($aLogin, $aPasswd)
89 global $dolibarr_main_authentication, $dolibarr_auto_user;
98 if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication =
'http,dolibarr';
100 if ($dolibarr_main_authentication ==
'forceuser' && empty($dolibarr_auto_user)) $dolibarr_auto_user =
'auto';
102 $authmode = explode(
',', $dolibarr_main_authentication);
105 if (!count($authmode))
107 $langs->load(
'main');
108 dol_print_error(
'', $langs->trans(
"ErrorConfigParameterNotDefined",
'dolibarr_main_authentication'));
112 $usertotest = $aLogin;
113 $passwordtotest = $aPasswd;
114 $entitytotest = $conf->entity;
119 $goontestloop =
false;
120 if (isset(
$_SERVER[
"REMOTE_USER"]) && in_array(
'http', $authmode)) $goontestloop =
true;
121 if (isset($aLogin) ||
GETPOST(
'openid_mode',
'alpha', 1)) $goontestloop =
true;
123 if ($test && $goontestloop)
125 include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
129 $this->
login($aLogin);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
login($aLogin)
Enter description here ...
Class ot manage authentication for pos module (cashdesk)
passwd($aPasswd)
Enter description here ...
$conf db
API class for accounts.
reponse($aReponse)
Enter description here ...
print $_SERVER["PHP_SELF"]
Edit parameters.
checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode, $context= '')
Return a login if login/pass was successfull.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
verif($aLogin, $aPasswd)
Validate login/pass.
__construct($db)
Enter description here ...