예제 #1
4
 function logoutAction()
 {
     session_abort();
     header("location:http://test4.com:81/course_work/auth/login");
 }
예제 #2
1
 /**
  * Сброс сессии
  * @return \Jugger\Context\Session
  */
 public function abort()
 {
     if ($this->isStarted) {
         session_abort();
         $this->isStarted = false;
     }
     return $this;
 }
예제 #3
1
 /**
  * Set magic.
  * @param  string $key
  * @param  any    $value
  * @return void
  * @throws Froq\Session\SessionException
  */
 public final function __set(string $key, $value)
 {
     if (!isset($_SESSION[$this->name])) {
         // stop writing first
         session_abort();
         throw new SessionException(sprintf("Session not started yet, call first '%s::start()' or use isset() first!", __CLASS__));
     }
     $_SESSION[$this->name][$key] = $value;
 }
예제 #4
0
 /**
  * Aborts the session without writing any declared
  * values to the storage.
  *
  * @return void
  */
 public function abort()
 {
     session_abort();
 }
예제 #5
0
 public function abort()
 {
     if (function_exists('session_abort')) {
         session_abort();
     }
 }
예제 #6
0
 /**
  * No more changes in session expected.
  * Unblocks the sessions, other scripts may start executing in parallel.
  */
 public static function write_close()
 {
     if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
         // More control over whether session data
         // is persisted or not.
         if (self::$sessionactive && session_id()) {
             // Write session and release lock only if
             // indication session start was clean.
             session_write_close();
         } else {
             // Otherwise, if possibile lock exists want
             // to clear it, but do not write session.
             @session_abort();
         }
     } else {
         // Any indication session was started, attempt
         // to close it.
         if (self::$sessionactive || session_id()) {
             session_write_close();
         }
     }
     self::$sessionactive = false;
 }
예제 #7
0
 public function deslogar()
 {
     session_abort('login');
     header("Location: ../../../");
     die;
 }
예제 #8
0
<?php

/**
 * Created by PhpStorm.
 * User: hp1
 * Date: 27-11-2015
 * Time: 19:20
 */
session_abort();
header("location: http://localhost:63342/webServer1/views/mainPage.php");
예제 #9
0
 /**
  * Finishes session without saving data.
  * Thus the original values in session data are kept.
  *
  * @throws Flex\SessionException
  */
 public function abort()
 {
     if ($this->status == PHP_SESSION_NONE) {
         throw new SessionException("abort must be called after session start and no active session was found.");
     }
     if ($this->status == PHP_SESSION_DISABLED) {
         throw new SessionException("Sessions are disabled");
     }
     session_abort();
     $this->updateStatus();
     $this->setActive();
 }
예제 #10
0
 function logoutAction()
 {
     session_abort();
     header("location:http://" . HOST . "/testWork/auth/login");
 }