Merge pull request #5047 from hregis/3.9_bug

Fix: broken multicompany transverse mode authentication feature
This commit is contained in:
Laurent Destailleur 2016-04-22 18:24:17 +02:00
commit 241e765829

View File

@ -207,6 +207,9 @@ class User extends CommonObject
} }
else // The fetch was forced on an entity else // The fetch was forced on an entity
{ {
if (!empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode))
$sql.= " WHERE u.entity IS NOT NULL"; // multicompany is on in transverse mode or user making fetch is on entity 0, so user is allowed to fetch anywhere into database
else
$sql.= " WHERE u.entity IN (0, ".$conf->entity.")"; $sql.= " WHERE u.entity IN (0, ".$conf->entity.")";
} }