Fix scrutinizer bug

This commit is contained in:
Laurent Destailleur 2018-09-08 18:40:36 +02:00
parent 84bbe8684b
commit f29720cc98

View File

@ -120,6 +120,7 @@ class MyModuleApi extends DolibarrApi
$restictonsocid = 0; // Set to 1 if there is a field socid in table of object
// If the internal user must only see his customers, force searching by him
$search_sale = 0;
if ($restictonsocid && ! DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id;
$sql = "SELECT t.rowid";