A bit more refactoring of clients.php for subgroups.
[timetracker.git] / clients.php
index ca83efd..cc08f9a 100644 (file)
@@ -29,6 +29,7 @@
 require_once('initialize.php');
 import('form.Form');
 import('ttTeamHelper');
+import('ttGroupHelper');
 
 // Access checks.
 if (!(ttAccessAllowed('view_own_clients') || ttAccessAllowed('manage_clients'))) {
@@ -72,8 +73,8 @@ if ($user->can('manage_subgroups')) {
 }
 
 if($user->can('manage_clients')) {
-  $active_clients = ttTeamHelper::getActiveClients($user->getGroup(), true);
-  $inactive_clients = ttTeamHelper::getInactiveClients($user->getGroup(), true);
+  $active_clients = ttGroupHelper::getActiveClients(true);
+  $inactive_clients = ttGroupHelper::getInactiveClients(true);
 } else
   $active_clients = $user->getAssignedClients();