This commit is contained in:
Guenter Lukas 2023-02-05 11:43:09 +01:00
parent 2690dd6274
commit edb81d1955

View File

@ -915,6 +915,11 @@ while ($currentdaytoshow < $lastdaytoshow) {
if ($usergroup > 0) {
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
}
if ($user->socid > 0)
{
// External users should see only contacts of their company
$sql .= " AND fk_soc=" . $socid;
}
//print $sql;
$resql = $db->query($sql);