Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($insert) {
         if ($this->profile !== null) {
             $this->profile->save(false);
         }
         if ($this->module->requireEmailConfirmation === true) {
             $this->send();
         }
     }
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($insert) {
         if ($this->profile !== null) {
             $this->profile->save(false);
         }
         $auth = Yii::$app->authManager;
         $role = $auth->getRole(self::ROLE_DEFAULT);
         $auth->assign($role, $this->id);
         if ($this->module->requireEmailConfirmation === true) {
             $this->send();
         }
     }
 }
Exemplo n.º 3
0
Arquivo: User.php Projeto: lulliz/qast
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($this->profile !== null) {
         $this->profile->save(false);
     }
     $auth = Yii::$app->authManager;
     $name = $this->role ? $this->role : self::ROLE_DEFAULT;
     $role = $auth->getRole($name);
     if (!$insert) {
         $auth->revokeAll($this->id);
     }
     $auth->assign($role, $this->id);
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($this->profile !== null) {
         $this->profile->save(false);
     }
 }