Move code around for simplicity and fix tests.

This commit is contained in:
James Cole
2017-06-07 11:13:04 +02:00
parent 92c5cabd70
commit 8bbd3063ec
14 changed files with 271 additions and 251 deletions

View File

@@ -97,12 +97,12 @@ class UserEventHandler
}
// get the email address
$email = $event->user->email;
$address = route('index');
$uri = route('index');
$ipAddress = $event->ipAddress;
// send email.
try {
Mail::to($email)->send(new RegisteredUserMail($address, $ipAddress));
Mail::to($email)->send(new RegisteredUserMail($uri, $ipAddress));
// @codeCoverageIgnoreStart
} catch (Swift_TransportException $e) {
Log::error($e->getMessage());