Esempio n. 1
0
 /**
  * initialize the ship
  */
 public function wake()
 {
     $uri = \CCServer::server('REQUEST_URI', '/');
     // fix doubled slashes
     $uri_fixed = preg_replace('/(\\/+)/', '/', $uri);
     // redirect if not match
     if ($uri != $uri_fixed) {
         \CCRedirect::to($uri_fixed)->send(true);
         die;
     }
 }
Esempio n. 2
0
 /**
  * Sign out action
  */
 public function action_sign_out()
 {
     if (!CCSession::valid_fingerprint()) {
         return CCRedirect::to('/');
     }
     CCAuth::sign_out();
     return CCRedirect::to('/');
 }
Esempio n. 3
0
 /**
  * destroy session
  */
 public function action_destroy($instance_key)
 {
     $this->manager->destroy();
     return \CCRedirect::action('index', array(), true);
 }