public function check() { Auth2::setDefault('propel'); $this->adapter = Auth2::factory(); $this->adapter->setAlgos('md5'); $this->adapter->setKey('jF8D13KIdXs7LA00'); $this->adapter->setModel('UserQuery'); $this->adapter->setLogin('username'); $this->adapter->setPass('password'); return $this->adapter->identify2(); }
/** * Método para verificar si tiene una sesión válida * * @param void * @return ture/false */ public static function isLogged() { $auth = Auth2::factory('model'); $bValid = $auth->isValid(); $bValid = $bValid && Session::get(SESSION_KEY); return $bValid; }