public function verifyCookie() { $cookie = new Ajde_Cookie(Config::get('ident') . '_user'); if (!$cookie->has('auth')) { return false; } $auth = $cookie->get('auth'); list($uid, $hash) = explode(':', $auth); if (!$this->loadByPK($uid)) { return false; } if ($this->getCookieHash() === $hash) { $this->login(); Ajde_Session_Flash::alert(sprintf(__('Welcome back %s, we automatically logged you in.'), $this->getFullname())); } else { return false; } }
public function verifyCookie($includeDomain = true) { $cookie = new Ajde_Cookie(config('app.id') . '_user', true); if (!$cookie->has('auth')) { return false; } $auth = $cookie->get('auth'); list($uid, $hash) = explode(':', $auth); if (!$this->loadByPK($uid)) { return false; } if ($this->getCookieHash($includeDomain) === $hash) { $this->login(); Ajde_Session_Flash::alert(sprintf(trans('Welcome back %s'), $this->getFullname())); Ajde_Cache::getInstance()->disable(); } else { return false; } }