From 042556a9cf84ca356020c41d0dbbdfb1a77613b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Mar 2015 03:50:55 +0100 Subject: [PATCH] Better comments --- htdocs/conf/conf.php.example | 2 +- htdocs/core/login/functions_ldap.php | 6 +++++- htdocs/user/card.php | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index 9982e91095e..e6d3ba0d73c 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -314,7 +314,7 @@ $dolibarr_main_db_prefix=''; // multicompany_transverse_mode // Prerequisite: Need external module "multicompany" // Pyramidal (0): The rights and groups are managed in each entity. Each user belongs to the entity he was created into. -// Transversal (1): The user is managed only into master entity and belongs to all entities or only one dedicated entity. +// Transversal (1): The user is created and managed only into master entity but can login to all entities. // Default value: 0 (pyramidal) // Examples: // $multicompany_transverse_mode='1'; diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 88a5f55de19..993249f3126 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -173,7 +173,11 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) global $mc; $ret=$mc->checkRight($user->id, $entitytotest); - if ($ret < 0) $login=false; // provoque l'echec de l'identification + if ($ret < 0) + { + dol_syslog("Failed to checkRight by module multicompany for user id = ".$user->id." into entity ".$entitytotest); + $login=false; // force error of authentication + } } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 67fe45d4c5c..b77022fed4e 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -213,7 +213,7 @@ if ($action == 'add' && $canadduser) $ret = $extrafields->setOptionalsFromPost($extralabels,$object); if ($ret < 0) $error++; - // If multicompany is off, admin users must all be on entity 0. + // Set entity property $entity=GETPOST('entity','int'); if (! empty($conf->multicompany->enabled)) {