restart() статический публичный Метод

Destroys a session first and then starts it again
static public restart ( )
Пример #1
0
 public function logout()
 {
     s::restart();
     if ($user = panel()->site()->user()) {
         $user->logout();
     }
     go(panel()->urls()->login());
 }
Пример #2
0
 protected function tearDown()
 {
     s::restart();
     // clean all triggers
     kirby::$triggered = array();
     kirby::$hooks = array();
     $this->removeContent();
     $this->removeAccounts();
 }
Пример #3
0
 protected static function kill()
 {
     self::$user = null;
     // overwrite the token
     $token = str::random();
     // the cookie is valid for 24 hours
     cookie::set('authFrontend', $token, 60 * 60 * 24);
     // restart the session
     s::restart();
 }
Пример #4
0
 function logout()
 {
     // overwrite the token
     $token = str::random();
     // the cookie is valid for 24 hours
     cookie::set('auth', $token, 60 * 60 * 24);
     // restart the session
     s::restart();
     // go to the homepage
     go(url());
 }
Пример #5
0
 protected function tearDown()
 {
     s::restart();
     $this->removeContent();
     $this->removeAccounts();
 }