Exemple #1
0
 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();
 }
 /**
  * Cambia el adaptador por defecto
  *
  * @param string $adapter nombre del adaptador por defecto
  */
 public static function setDefault($adapter)
 {
     self::$_defaultAdapter = $adapter;
 }
Exemple #3
0
 /**
  * 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;
 }