Commit a3025ef3eedd43f0504f014b6f1064ba2e9e2d84

Authored by Administrator
1 parent 2ffff539

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

common/components/Mailer.php
@@ -9,6 +9,7 @@ class Mailer extends Widget{ @@ -9,6 +9,7 @@ class Mailer extends Widget{
9 public $email; 9 public $email;
10 public $text; 10 public $text;
11 public $subject; 11 public $subject;
  12 + public $type;
12 13
13 public function init(){ 14 public function init(){
14 15
@@ -27,7 +28,7 @@ class Mailer extends Widget{ @@ -27,7 +28,7 @@ class Mailer extends Widget{
27 $mail->Password = "k0l0b04eg"; 28 $mail->Password = "k0l0b04eg";
28 $mail->SetFrom('dockdep@gmail.com'); 29 $mail->SetFrom('dockdep@gmail.com');
29 $mail->Subject = $this->subject; 30 $mail->Subject = $this->subject;
30 - $mail->MsgHTML($this->text); 31 + $mail->MsgHTML($this->render($this->type));
31 $address = "dockdep@gmail.com"; 32 $address = "dockdep@gmail.com";
32 $mail->AddAddress($address); 33 $mail->AddAddress($address);
33 $mail->AddAddress($this->email); 34 $mail->AddAddress($this->email);
common/models/Customer.php
@@ -76,13 +76,8 @@ class Customer extends \yii\db\ActiveRecord implements \yii\web\IdentityInterfac @@ -76,13 +76,8 @@ class Customer extends \yii\db\ActiveRecord implements \yii\web\IdentityInterfac
76 } 76 }
77 77
78 public function sendMsg(){ 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 \ No newline at end of file 2 \ No newline at end of file