ftimme
2012-03-07 f0ed72bf69ac76b872d8040d85efaf5b0c51040a
interface/web/sites/tools.inc.php
@@ -55,9 +55,7 @@
function getClientName($dataRecord) {
    global $app, $conf;
    /* FS#1234 - CLIENTNAME value when in reseller account - need check this workarround impact */
    //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'])) {
    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 {
@@ -98,7 +96,7 @@
         }
    }
    /* get the name of the client */
    $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . $client_group_id);
    $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . intval($client_group_id));
    $clientID = $tmp['client_id'];
    if ($clientID == '') $clientID = '0';
    return $clientID;