re #108 use app main logger + multiple fixes
This commit is contained in:
@ -15,7 +15,6 @@ use Da\User\Contracts\ServiceInterface;
|
||||
use Da\User\Factory\TokenFactory;
|
||||
use Da\User\Model\User;
|
||||
use Da\User\Traits\MailAwareTrait;
|
||||
use yii\log\Logger;
|
||||
|
||||
class ResendConfirmationService implements ServiceInterface
|
||||
{
|
||||
@ -23,13 +22,11 @@ class ResendConfirmationService implements ServiceInterface
|
||||
|
||||
protected $model;
|
||||
protected $mailService;
|
||||
protected $logger;
|
||||
|
||||
public function __construct(User $model, MailService $mailService, Logger $logger)
|
||||
public function __construct(User $model, MailService $mailService)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->mailService = $mailService;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function run()
|
||||
@ -37,6 +34,7 @@ class ResendConfirmationService implements ServiceInterface
|
||||
if ($this->model && !$this->model->getIsConfirmed()) {
|
||||
$token = TokenFactory::makeConfirmationToken($this->model->id);
|
||||
$this->mailService->setViewParam('token', $token);
|
||||
|
||||
return $this->sendMail($this->model);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user