/** * Shared * @return \Touchbase\Data\Store */ public static function shared() { $store = Session::get(self::STORE_SESSION_KEY, new Store()); if (!$store->count()) { Session::set(self::STORE_SESSION_KEY, $store); } return $store; }
/** * Cookie Hash * @return string */ public function cookieHash(AuthedUserInterface $user) { $salt = $this->config()->get("auth")->get("cookie_hash", "8)pu1j[Juogi5263N6sS5s+fE5V/kw"); return sha1($user->ID() . $salt . Session::ID()); }
/** * Logout * @return BOOL */ public static function logout() { Session::destroy(); return self::shared()->logout(); }