Files
phpvms/app/Mail/NewLoginDetails.php
web541 08df20de19 Fixed a few field entries (#116)
* Stopped inheritance errors popping up

* Added fillable fields

These would not save otherwise.

* Added country fillable field

Wouldn’t save when importing from phpvms classic.

* Added more to classic importer

Change arguments to ask in terminal
Fixed table_prefix names in Importer.php

Added the ability to import users from phpvms classic (tested on
simpilot’s 5.5.x) and when importing, it will then reset the user’s
password to a temporary hash and then email it to the user to then
change when they first log in.

* Changes to ImporterService
2018-01-03 15:41:21 -06:00

30 lines
705 B
PHP

<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Mail\Mailable;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
class NewLoginDetails extends Mailable
{
use Queueable, SerializesModels;
public $subject, $user, $newpw;
public function __construct(User $user, $newpw=null, $subject=null)
{
$this->subject = $subject ?: 'New Login Details';
$this->newpw = $newpw ?: 'N/A';
$this->user = $user;
}
public function build()
{
return $this->markdown('emails.user.newlogindetails')
->subject($this->subject)
->with(['user' => $this->user, 'newpw' => $this->newpw]);
}
}