/** * Updates an existing User model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id * @return mixed */ public function actionUpdate($id) { /** @var \core\auth\models\Admin $userClass */ $userClass = Kiwi::getAdminClass(); /** @var \core\auth\models\AdminModel $model */ $model = Kiwi::getAdminModel(['user' => $userClass::findOne($id)]); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['index']); } else { return $this->render('/user/update', ['model' => $model]); } }