logout() public static method

Log out process: delete cookie, delete session
public static logout ( )
Example #1
0
 /**
  * The logout action
  * Perform logout, redirect user to main-page
  */
 public function logout()
 {
     EduszModel::logreg("Logged out");
     LoginModel::logout();
     Redirect::home();
     exit;
 }
 /**
  * Check if there is concurrent session, and logout if so, redirect to home and hard-stop.
  */
 public static function checkSessionConcurrency()
 {
     if (Session::userIsLoggedIn()) {
         if (Session::concurrentSessionsExist()) {
             LoginModel::logout();
             Redirect::home();
             exit;
         }
     }
 }
Example #3
0
 /**
  * Edit user name (perform the real action after form has been submitted)
  */
 public function editUsername_action()
 {
     // check if csrf token is valid
     if (!Csrf::isTokenValid()) {
         LoginModel::logout();
         Redirect::home();
         exit;
     }
     UserModel::editUserName(Request::post('user_name'));
     Redirect::to('user/editUsername');
 }
Example #4
0
 /**
  * The logout action
  * Perform logout, redirect user to main-page
  */
 public function logout()
 {
     LoginModel::logout();
     Redirect::home();
     exit;
 }
 public function logoutAction()
 {
     $view = new LoginModel();
     $view->logout();
 }
Example #6
0
 /**
  * @function logoutTimeoutTutor
  * @public
  * @static
  * @returns NONE
  * @desc NONE
  * @param NONE
  * @example NONE
  */
 public static function logoutTimeoutTutor()
 {
     LoginModel::logout();
     $login_successful = LoginModel::login('student', 'system', '');
 }
 protected static function destroy()
 {
     Session::set('feedback_positive', null);
     Session::set('feedback_negative', null);
     LoginModel::logout();
 }
Example #8
0
 public function logout()
 {
     LoginModel::logout();
     Teleport::home();
 }