Commit a3025ef3eedd43f0504f014b6f1064ba2e9e2d84

Authored by Administrator
1 parent 2ffff539

проапдейтил роли

common/components/Mailer.php
... ... @@ -9,6 +9,7 @@ class Mailer extends Widget{
9 9 public $email;
10 10 public $text;
11 11 public $subject;
  12 + public $type;
12 13  
13 14 public function init(){
14 15  
... ... @@ -27,7 +28,7 @@ class Mailer extends Widget{
27 28 $mail->Password = "k0l0b04eg";
28 29 $mail->SetFrom('dockdep@gmail.com');
29 30 $mail->Subject = $this->subject;
30   - $mail->MsgHTML($this->text);
  31 + $mail->MsgHTML($this->render($this->type));
31 32 $address = "dockdep@gmail.com";
32 33 $mail->AddAddress($address);
33 34 $mail->AddAddress($this->email);
... ...
common/models/Customer.php
... ... @@ -76,13 +76,8 @@ class Customer extends \yii\db\ActiveRecord implements \yii\web\IdentityInterfac
76 76 }
77 77  
78 78 public function sendMsg(){
79   - $body = 'Вас приветствует сайт Rukzachok';
80   - $body .= "\n\r";
81   - $body .= 'Ваш логин: '.$this->username;
82   - $body .= "\n\r";
83   - $body .= 'Ваш пароль: '.$this->password;
84 79  
85   - Mailer::widget(['text'=> $body, 'subject'=> 'Спасибо за регистрацию', 'email' => $this->username ]);
  80 + Mailer::widget(['type' => 'registration', 'subject'=> 'Спасибо за регистрацию', 'email' => $this->username ]);
86 81  
87 82 }
88 83  
... ...
common/widgets/views/registration.php 0 → 100644
  1 +<?= 'Спасибо за регистрацию'?>
0 2 \ No newline at end of file
... ...