re #108 use app main logger + multiple fixes

This commit is contained in:
Antonio Ramirez
2017-11-12 21:58:48 +01:00
parent 77430fbb74
commit 190fafa5f1
30 changed files with 100 additions and 63 deletions

View File

@ -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);
}