/**
  * Handle the command.
  *
  * @param Mailer                     $mailer
  * @param SettingRepositoryInterface $settings
  * @return mixed
  */
 public function handle(Mailer $mailer, SettingRepositoryInterface $settings)
 {
     $path = $this->dispatch(new GetResetPasswordPath($this->user, $this->redirect));
     return $mailer->send('anomaly.module.users::emails/reset', ['user' => $this->user, 'path' => $path], function (Message $message) use($settings) {
         $message->subject('Reset your password')->to($this->user->getEmail(), $this->user->getDisplayName())->from($settings->value('streams::server_email', 'noreply@localhost'));
     });
 }
 /**
  * Handle the command.
  *
  * @param Repository $config
  * @param Encrypter  $encrypter
  * @return string
  */
 public function handle(Repository $config, Encrypter $encrypter)
 {
     $email = $encrypter->encrypt($this->user->getEmail());
     $code = $encrypter->encrypt($this->user->getResetCode());
     $query = "?email={$email}&code={$code}&redirect={$this->redirect}";
     return $config->get('anomaly.module.users::paths.reset') . $query;
 }
 /**
  * Handle the command.
  *
  * @param Mailer     $mailer
  * @param Repository $config
  * @return bool
  */
 public function handle(Mailer $mailer, Repository $config)
 {
     $path = $this->dispatch(new GetResetPasswordPath($this->user, $this->redirect));
     $mailer->send('anomaly.module.users::message/reset', compact('user', 'path'), function (Message $message) use($config) {
         $message->subject('Reset your password')->to($this->user->getEmail(), $this->user->getDisplayName())->from($config->get('mail.from.address', 'noreply@localhost'));
     });
     return empty($mailer->failures());
 }
 /**
  * Handle the command.
  *
  * @param Encrypter $encrypter
  * @return string
  */
 public function handle(Encrypter $encrypter)
 {
     $email = $encrypter->encrypt($this->user->getEmail());
     $code = $encrypter->encrypt($this->user->getResetCode());
     return "/users/password/reset?email={$email}&code={$code}&redirect={$this->redirect}";
 }
 /**
  * Handle the command.
  *
  * @return string|null
  */
 public function handle(Encrypter $encrypter)
 {
     $email = $encrypter->encrypt($this->user->getEmail());
     $code = $encrypter->encrypt($this->user->getActivationCode());
     return "/users/activate?email={$email}&code={$code}&redirect={$this->redirect}";
 }