X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=index.php;h=fd4dde8ed821ebb73443cd99781cca6f880d380f;hb=c13fcda70448cc81d1555fe2ee25a5d0ed2f74c7;hp=a6eac171b88057991f69c70f15d0db533c438f6f;hpb=a37376aa8be3ada18b8c05a8661dfd3cc3ca6784;p=timetracker.git diff --git a/index.php b/index.php index a6eac171..fd4dde8e 100644 --- a/index.php +++ b/index.php @@ -30,13 +30,12 @@ require_once('initialize.php'); // Redirects for admin and client roles. if ($auth->isAuthenticated()) { - if ($user->isAdmin()) { + if ($user->can('administer_site')) { header('Location: admin_teams.php'); exit(); - } - else if ($user->isClient()) { + } elseif ($user->isClient()) { header('Location: reports.php'); - exit(); + exit(); } } @@ -77,4 +76,4 @@ if ($mobileBrowser) { \ No newline at end of file +?>