Esempio n. 1
0
 private function landing()
 {
     $factory = new Factory();
     if (\Current_User::isLogged()) {
         if (!\Current_User::allow('tailgate') && !$factory->isStudent(\Current_User::getUsername())) {
             return $this->notStudentMessage();
         }
         $student = $factory->getCurrentStudent();
         if ($student) {
             // student is logged in and has account
             return $this->showStatus($student->getId());
         } else {
             // student is logged in but doesn't have an account
             return $this->createAccount();
         }
     } else {
         // student is not logged in
         return $this->newAccountInformation();
     }
 }