示例#1
0
 /**
  * @return string[]
  */
 public function getEventTypes()
 {
     return array(LoginEvent::getName(), RegistrationEvent::getName(), NewPasswordEvent::getName(), PasswordRecoveryEvent::getName());
 }
示例#2
0
 /**
  * @param \Venne\Security\User $user
  * @param string $link
  * @param \Venne\Security\User|null $sendBy
  */
 public function sendRecoveryUrl(User $user, $link, User $sendBy = null)
 {
     $sendBy = $sendBy !== null ? $sendBy : $user;
     $this->emailManager->send($user->getEmail(), null, PasswordRecoveryEvent::getName(), 'passwordRecovery', array('link' => $link));
     $this->notificationManager->notify(PasswordRecoveryEvent::getName(), $user, 'passwordRecovery', 'Password recovery URL has been sent.', $sendBy);
 }