Fix minor

This commit is contained in:
Laurent Destailleur
2018-01-14 20:11:38 +01:00
parent cc5dcde9e1
commit 90fc086814
5 changed files with 25 additions and 11 deletions

View File

@@ -80,7 +80,8 @@ function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmod
$newdir=dol_osencode($dir);
// Check if file found (do not use dol_is_file to avoid loading files.lib.php)
if (is_file($newdir.'/'.$authfile)) $fullauthfile=$newdir.'/'.$authfile;
$tmpnewauthfile = $newdir.(preg_match('/\/$/',$newdir)?'':'/').$authfile;
if (is_file($tmpnewauthfile)) $fullauthfile=$tmpnewauthfile;
}
$result=false;
@@ -89,7 +90,7 @@ function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmod
{
// Call function to check user/password
$function='check_user_password_'.$mode;
$login=call_user_func($function,$usertotest,$passwordtotest,$entitytotest);
$login=call_user_func($function, $usertotest, $passwordtotest, $entitytotest);
if ($login) // Login is successfull
{
$test=false; // To stop once at first login success