/** * 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; } }
/** * Sign out action */ public function action_sign_out() { if (!CCSession::valid_fingerprint()) { return CCRedirect::to('/'); } CCAuth::sign_out(); return CCRedirect::to('/'); }
/** * destroy session */ public function action_destroy($instance_key) { $this->manager->destroy(); return \CCRedirect::action('index', array(), true); }