diff --git a/interface/web/sites/tools.inc.php b/interface/web/sites/tools.inc.php index 66ce39ab15846250f00f6617ba1aae297f81e300..16b1c5df808d4e751a518c53b263c237dddf7f0c 100644 --- a/interface/web/sites/tools.inc.php +++ b/interface/web/sites/tools.inc.php @@ -56,7 +56,7 @@ function replacePrefix($name, $dataRecord) { function getClientName($dataRecord) { global $app, $conf; - if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { + if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { // Get the group-id of the user $client_group_id = $_SESSION["s"]["user"]["default_group"]; } else { @@ -82,7 +82,7 @@ function getClientName($dataRecord) { function getClientID($dataRecord) { global $app, $conf; - if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { + if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { // Get the group-id of the user $client_group_id = $_SESSION["s"]["user"]["default_group"]; } else {