Example #1
0
 /**
  *	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;
 }
Example #2
0
 /**
  *	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());
 }
Example #3
0
 /**
  *	Logout
  *	@return BOOL
  */
 public static function logout()
 {
     Session::destroy();
     return self::shared()->logout();
 }