Better notification for user creation, only add button if needed.

This commit is contained in:
Dane Everitt 2017-02-17 19:26:02 -05:00
parent 008cccb098
commit 397172de3b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -69,11 +69,16 @@ class AccountCreated extends Notification implements ShouldQueue
*/ */
public function toMail($notifiable) public function toMail($notifiable)
{ {
return (new MailMessage) $message = (new MailMessage)
->greeting('Hello ' . $this->user->name . '!') ->greeting('Hello ' . $this->user->name . '!')
->line('You are recieving this email because an account has been created for you on Pterodactyl Panel.') ->line('You are recieving this email because an account has been created for you on Pterodactyl Panel.')
->line('Username: ' . $this->user->username) ->line('Username: ' . $this->user->username)
->line('Email: ' . $notifiable->email) ->line('Email: ' . $notifiable->email);
->action('Setup Your Account', url('/auth/password/reset/' . $this->user->token . '?email=' . $notifiable->email));
if (! is_null($this->user->token)) {
return $message->action('Setup Your Account', url('/auth/password/reset/' . $this->user->token . '?email=' . $notifiable->email));
}
return $message;
} }
} }