Ejemplo n.º 1
0
 /**
  * @param User $user
  *
  * @return string
  */
 protected function getResetToken(User $user)
 {
     /** @var \DateTime $lastLogin */
     $lastLogin = $user->getLastLogin();
     $dateTime = $lastLogin instanceof \DateTime ? $lastLogin->format('Y-m-d H:i:s') : null;
     return hash('sha256', $user->getUsername() . $user->getEmail() . $dateTime);
 }
 /**
  * {@inheritDoc}
  */
 public function getLastLogin()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLastLogin', array());
     return parent::getLastLogin();
 }