isAuthenticated()) { if ($user->can('administer_site')) { header('Location: ../admin_groups.php'); exit(); } elseif ($user->isClient()) { header('Location: ../reports.php'); exit(); } } // Redirect to time.php or mobile/time.php for other roles. ?>