Commit 8e4ec95c38945bd6a1bf18cd95e48b7d88b19c62
1 parent
e2aaf166
01.06.16
Showing
1 changed file
with
1 additions
and
6 deletions
Show diff stats
backend/controllers/UserController.php
@@ -119,13 +119,8 @@ class UserController extends Controller | @@ -119,13 +119,8 @@ class UserController extends Controller | ||
119 | $model->load(Yii::$app->request->post()); | 119 | $model->load(Yii::$app->request->post()); |
120 | return ActiveForm::validate($model); | 120 | return ActiveForm::validate($model); |
121 | }else if ($model->load(Yii::$app->request->post()) && $model->validate()) { | 121 | }else if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
122 | - $model->save(); | ||
123 | 122 | ||
124 | - foreach($model->role as $k => $role){ | ||
125 | - $auth = Yii::$app->authManager; | ||
126 | - $authorRole = $auth->getRole($role); | ||
127 | - $auth->assign($authorRole, $model->id); | ||
128 | - } | 123 | + $model->save(); |
129 | 124 | ||
130 | return $this->redirect(['view', 'id' => $model->id]); | 125 | return $this->redirect(['view', 'id' => $model->id]); |
131 | } else { | 126 | } else { |