コード例 #1
0
ファイル: UserController.php プロジェクト: islamham/125ent
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     $userRole = Yii::$app->authManager->getRole($this->role);
     Yii::$app->authManager->assign($userRole, $this->id);
 }