diff --git a/Module.php b/Module.php index 4c64aef..1e9feb8 100644 --- a/Module.php +++ b/Module.php @@ -16,7 +16,7 @@ class Module extends \yii\base\Module /** * @var string Module version */ - protected $version = "0.9.92"; + protected $version = "0.9.93"; /** * @var string Alias for module diff --git a/controllers/DefaultController.php b/controllers/DefaultController.php index 226aff1..07e93b4 100644 --- a/controllers/DefaultController.php +++ b/controllers/DefaultController.php @@ -414,6 +414,10 @@ public function actionConfirm($token) $email = $newEmail ?: $user->email; $userToken->delete(); + if(isset($user->ref) AND $user->ref == 'http://rastishka.by/'){ + return $this->redirect('http://rastishka.by/'); + } + return $this->redirect('/#confirm-success'); } diff --git a/models/User.php b/models/User.php index c0d9acf..c27aa64 100644 --- a/models/User.php +++ b/models/User.php @@ -116,6 +116,9 @@ public function rules() [['role_id', 'status'], 'integer', 'on' => ['admin']], [['banned_at'], 'integer', 'on' => ['admin']], [['banned_reason'], 'string', 'max' => 255, 'on' => 'admin'], + + // register referral + [['ref'], 'string', 'max' => 255], ]; // add required for currentPassword on account page