Beispiel #1
0
 /**
  *
  * @return integer
  */
 private function getUserId() : int
 {
     $this->query->setQuery('user')->findBy($this->column, $this->login);
     $result = $this->query->getStaticQuery();
     if (count($result) === 1 && HashPass::verifyPassword($this->password, $result[0]->getPassword())) {
         $this->userEntity = $result[0];
         return $this->userEntity->getId();
     }
     return 0;
 }
Beispiel #2
0
 /**
  *
  * @param string $name
  */
 private function addAccountValue(string $name)
 {
     if ($this->formAction === 'accountData') {
         $entityGetter = $this->getEntityGetter($name);
         FormGenerator::addItem(['value' => $this->user->getUserSession()->{$entityGetter}()]);
     }
 }
Beispiel #3
0
 /**
  *
  * @return boolean
  */
 public function isUserLoggedIn() : bool
 {
     return isset($this->userSession) && DBDoctrine::em()->getRepository('Entity\\Users')->findBy(['login' => $this->userSession->getLogin(), 'password' => $this->userSession->getPassword()]);
 }
 /**
  * {@inheritDoc}
  */
 public function getPasswdRecoveryDate()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPasswdRecoveryDate', array());
     return parent::getPasswdRecoveryDate();
 }