dolibarr 20.0.0
functions_dolibarr.php File Reference

Authentication functions for Dolibarr mode (check user on login or email and check pass) More...

Go to the source code of this file.

Functions

 check_user_password_dolibarr ($usertotest, $passwordtotest, $entitytotest=1)
 Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"] Note: On critical error (hack attempt), we put a log "functions_dolibarr::check_user_password_dolibarr authentication KO".
 

Detailed Description

Authentication functions for Dolibarr mode (check user on login or email and check pass)

Definition in file functions_dolibarr.php.

Function Documentation

◆ check_user_password_dolibarr()

check_user_password_dolibarr ( $usertotest,
$passwordtotest,
$entitytotest = 1 )

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"] Note: On critical error (hack attempt), we put a log "functions_dolibarr::check_user_password_dolibarr authentication KO".

Parameters
string$usertotestLogin
string$passwordtotestPassword
int$entitytotestNumber of instance (always 1 if module multicompany not enabled)
Returns
string Login if OK, '' if KO

Definition at line 39 of file functions_dolibarr.php.

References dol_now(), dol_syslog(), dol_time_plus_duree(), dol_verifyHash(), getDolGlobalInt(), getDolGlobalString(), and getUserRemoteIP().