/** * {@inheritDoc} */ public function equals(UserInterface $user) { if (!$user instanceof User) { return false; } if ($this->password !== $user->getPassword()) { return false; } if ($this->getSalt() !== $user->getSalt()) { return false; } if ($this->username !== $user->getUsername()) { return false; } if ($this->accountNonExpired !== $user->isAccountNonExpired()) { return false; } if ($this->accountNonLocked !== $user->isAccountNonLocked()) { return false; } if ($this->credentialsNonExpired !== $user->isCredentialsNonExpired()) { return false; } if ($this->enabled !== $user->isEnabled()) { return false; } return true; }
/** * Send an email to a user to confirm the account creation * * @param UserInterface $user * * @return void */ public function sendRecoveryPasswordMessage($user) { $templateName = 'CoreBundle:Email:recovery.password.email.html.twig'; $context = array('name' => $user->getName(), 'email' => $user->getEmail(), 'hash' => $user->getSalt()); $this->sendMessage($templateName, $context, $this->parameters['company']['email'], $user->getEmail()); }
/** * @inheritDoc */ public function equals(UserInterface $user) { if (!$user instanceof WebserviceUser) { return false; } if ($this->password !== $user->getPassword()) { return false; } if ($this->getSalt() !== $user->getSalt()) { return false; } if ($this->username !== $user->getUsername()) { return false; } return true; }