X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=user_add.php;h=eb9391472acb6248ec9eb24fd3407730b6fd4a43;hb=509d1d70d0580e26a4467e123c06d2c8939f32cc;hp=91286537d534e2191c7eb27d0df03c174272705b;hpb=fd0872d9e582113346fa1e93557f370286c5c9f2;p=timetracker.git diff --git a/user_add.php b/user_add.php index 91286537..eb939147 100644 --- a/user_add.php +++ b/user_add.php @@ -34,18 +34,19 @@ import('form.Table'); import('form.TableColumn'); import('ttRoleHelper'); -// Access check. +// Access checks. if (!ttAccessAllowed('manage_users')) { header('Location: access_denied.php'); exit(); } +// End of access checks. // Use the "limit" plugin if we have one. Ignore include errors. // The "limit" plugin is not required for normal operation of the Time Tracker. @include('plugins/limit/user_add.php'); if ($user->isPluginEnabled('cl')) - $clients = ttTeamHelper::getActiveClients($user->team_id); + $clients = ttTeamHelper::getActiveClients($user->group_id); $assigned_projects = array(); if ($request->isPost()) { @@ -89,7 +90,7 @@ if ($user->isPluginEnabled('cl')) $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); -$projects = ttTeamHelper::getActiveProjects($user->team_id); +$projects = ttTeamHelper::getActiveProjects($user->group_id); // Define classes for the projects table. class NameCellRenderer extends DefaultCellRenderer { @@ -149,7 +150,8 @@ if ($request->isPost()) { 'login' => $cl_login, 'password' => $cl_password1, 'rate' => $cl_rate, - 'team_id' => $user->team_id, + 'group_id' => $user->getActiveGroup(), + 'org_id' => $user->org_id, 'role_id' => $cl_role_id, 'client_id' => $cl_client_id, 'projects' => $assigned_projects,