return in_array($do_something, $this->rights);
}
- // isAdmin - determines whether current user is admin.
- function isAdmin() {
- return $this->can('administer_site');
- }
-
// isManager - determines whether current user is group manager.
// This is a legacy function that we are getting rid of by replacing with rights check.
function isManager() {
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <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> |
+ <td align="center"> Anuko Time Tracker 1.17.87.4252 | 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>
{$forms.importForm.open}
-
<table cellspacing="0" cellpadding="7" border="0" width="720">
<tr>
<td align="center">
-{if $user->isAdmin()}
<table border="0" width="60%">
<tr><td colspan="2">{$i18n.form.import.hint}<br></td></tr>
<tr><td colspan="2"> </td></tr>
</tr>
<tr><td height="50" align="center" colspan="2">{$forms.importForm.btn_submit.control}</td></tr>
</table>
-{/if}
</td>
</tr>
</table>
$user = new ttUser(null, $auth->getUserId());
// Redirect, depending on user role.
- if ($user->isAdmin()) {
+ if ($user->can('administer_site')) {
header('Location: ../admin_groups.php');
} elseif ($user->isClient()) {
header('Location: ../reports.php');