$mdb2 = getConnection();
global $user;
- // Preliminary checks. Only managers, co-managers, and admin can do this.
- if (!$user->canManageTeam() && !$user->isAdmin())
+ // Preliminary checks. Only managers and co-managers can do this.
+ if (!$user->canManageTeam())
return false;
// Tho logic is different depending on who is doing the operation.
- // Co-manager and admin - mark user deleted.
+ // Co-manager - mark user deleted.
// Manager - mark user deleted. If manager is the only account in group, mark group items deleted.
- // admin part.
- if ($user->isAdmin()) {
- // Mark user binds as deleted.
- $sql = "update tt_user_project_binds set status = NULL where user_id = $user_id";
- $affected = $mdb2->exec($sql);
- if (is_a($affected, 'PEAR_Error'))
- return false;
-
- // Mark favorite reports as deleted.
- $sql = "update tt_fav_reports set status = NULL where user_id = $user_id";
- $affected = $mdb2->exec($sql);
- if (is_a($affected, 'PEAR_Error'))
- return false;
-
- // Mark user as deleted.
- $sql = "update tt_users set status = NULL where id = $user_id";
- $affected = $mdb2->exec($sql);
- if (is_a($affected, 'PEAR_Error'))
- return false;
-
- } elseif ($user->isCoManager()) {
+ // Co-manager part.
+ if ($user->isCoManager()) {
// Mark user binds as deleted.
$sql = "update tt_user_project_binds set status = NULL where user_id = $user_id";
$affected = $mdb2->exec($sql);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.87.4250 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.87.4251 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>