public function handle(UserEmailWasUpdatedAndWaitForConfirmation $event)
 {
     $userId = $event->userId;
     $user = UserModel::find($userId);
     $reset = EmailReset::where('user_id', $userId)->first();
     if ($reset && $user) {
         Mail::send('inoplate-account::email.reset-email', ['user' => $user, 'reset' => $reset], function ($mail) use($user, $reset) {
             $mail->to($reset->email, $user->name)->subject('Account email change confirmation!');
         });
     }
 }
Пример #2
0
 /**
  * Remove registered email change
  * 
  * @param  string $userId
  * @return void
  */
 public function remove($userId)
 {
     $this->model->where('user_id', $userId)->delete();
 }