logout() public static method

Log out process: delete cookie, delete session
public static logout ( )
示例#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;
         }
     }
 }
示例#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');
 }
示例#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();
 }
示例#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', '');
 }
示例#7
0
 protected static function destroy()
 {
     Session::set('feedback_positive', null);
     Session::set('feedback_negative', null);
     LoginModel::logout();
 }
示例#8
0
 public function logout()
 {
     LoginModel::logout();
     Teleport::home();
 }