Example #1
0
 public static function LoggedOutOnly()
 {
     // if user is logged in...
     if (Session::get('user_logged_in')) {
         // Session::add('feedback_negative', 'Error. To access this section of the website, you need to log-out first.');
         Teleport::to('error/you-shall-not-pass/log-out/');
         exit;
     }
 }
Example #2
0
 public function new_account_action()
 {
     $newAccount = RegistrationModel::CreateNewAccount();
     if ($newAccount) {
         Teleport::to('account/log-in/');
     } else {
         Teleport::to('account/new-account/');
     }
 }