More comments

This commit is contained in:
Laurent Destailleur 2015-03-23 04:16:58 +01:00
parent 042556a9cf
commit e269aa83b5
2 changed files with 4 additions and 3 deletions

View File

@ -101,7 +101,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
if ($passok && ! empty($obj->entity) && (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)))
{
$ret=$mc->checkRight($obj->rowid, $entitytotest);
$ret=$mc->checkRight($obj->rowid, $entitytotest); // The module multicompany check here user belong to at least one group into company. This is a bugged behaviour, so you must hack module to make thing working.
if ($ret < 0) $passok=false;
}

View File

@ -169,10 +169,11 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
dol_syslog("functions_ldap::check_user_password_ldap Sync user found id=".$user->id);
// On verifie si le login a change et on met a jour les attributs dolibarr
if ($conf->multicompany->enabled) {
if ($conf->multicompany->enabled)
{
global $mc;
$ret=$mc->checkRight($user->id, $entitytotest);
$ret=$mc->checkRight($user->id, $entitytotest, $user); // The module multicompany check here user belong to at least one group into company. This is a bugged behaviour, so you must hack module to make thing working.
if ($ret < 0)
{
dol_syslog("Failed to checkRight by module multicompany for user id = ".$user->id." into entity ".$entitytotest);