/**
  * 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)
 {
     $this->actionDescription = $this->updateActionDescription;
     $this->model = $this->findModel($id);
     $this->model->scenario = $this->updateScenario;
     if ($this->model->load($this->getRequest()->post())) {
         if (!is_null($this->uploadField)) {
             $this->model->{$this->uploadField} = UploadedFile::getInstance($this->model, $this->uploadField);
         }
         if ($this->model->validate()) {
             return $this->saveFormData();
         }
     }
     return $this->render($this->updateViewFile, ['model' => $this->model]);
 }