if ($auth->getConfigValue('USER_MANAGER', 'SHOW_STATUS') != 'F') { $table->addSimpleField(!isset($hdr['Stato']) ? _('Stato') : $hdr['Stato'], 'status', 'CALCULATED', 90, array('visible' => true, 'align' => 'center', 'sortable' => true, 'order_fields' => 'us_login, us_id asc')); } $table->addSimpleField(!isset($hdr['action']) ? _('Azione') : $hdr['action'], '', 'LINK', 70); /** Get the users list */ //SS: Prende campi di altre tabelle $sql2 = "SELECT user_manager.us_id, us_login, us_name, us_status, dn_name {$extraFields} \n" . "FROM <SQL> \n" . "INNER JOIN " . $auth_options['users_table'] . " ON user_manager.us_id=" . $auth_options['users_table'] . ".us_id \n" . "INNER JOIN " . $auth_options['domains_name_table'] . " ON " . $auth_options['users_table'] . ".do_id=" . $auth_options['domains_name_table'] . ".do_id \n" . "{$group_join} \n" . "WHERE \n" . " dn_type = 'N' AND \n" . " {$group_where} \n" . "GROUP BY user_manager.us_id, us_login, us_name, us_status, dn_name {$extraGroupFields} \n " . "ORDER BY " . $table->getSQLOrder(); $performance_time[] = array('text' => 'Before getUsersList time: ', 'time' => microtime(true)); $list = $auth->getUsersList($fltdn_name, $fltapp_code, array('fields' => 'us_id', 'where' => $filter_where, 'offset' => $st, 'limit' => $limit, 'sql' => $sql2), $tot); $performance_time[] = array('text' => 'After getUsersList time: ', 'time' => microtime(true)); $table_html = $table->CreateTableHeader($order); $domain_applications = array(); /** cache the applications available for all the domains */ foreach ($list as $value) { if ($value['us_status'] == 'E') { $table->AddCalcValue('status', !isset($hdr['ENABLED']) ? _('ATTIVO') : $hdr['ENABLED']); } else { if ($value['us_status'] == 'D') { $table->AddCalcValue('status', !isset($hdr['DISABLED']) ? _('NON ATTIVO') : $hdr['DISABLED']); } else { $table->AddCalcValue('status', _('ELIMINATO')); } } if ($auth->getConfigValue('USER_MANAGER', 'SHOW_GROUPS') != 'F') { /** Groups data required */ $userData = $auth->getUserData($value['dn_name'], $fltapp_code, $value['us_login'], array('GROUPS')); $groups = array(); if (is_array($userData['groups'])) { foreach ($userData['groups'] as $val) { if ($canShowApplications && $fltapp_code == '') { $groups[] = $val['app_name'] . ' ' . $val['gr_name'];