/**
  * Shows profile settings form.
  *
  * @return string|\yii\web\Response
  */
 public function actionProfile()
 {
     $model = $this->finder->findProfileById(Yii::$app->user->identity->getId());
     $this->performAjaxValidation($model);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         $flash = ['success', Yii::t('user', 'Your profile has been updated')];
     } elseif (Yii::$app->getRequest()->get('complete')) {
         $flash = ['info', Yii::t('user', 'Please complete filling profile info')];
     }
     if (isset($flash)) {
         Yii::$app->getSession()->setFlash($flash[0], $flash[1]);
         return $this->redirect('profile');
     }
     return $this->render('profile', ['model' => $model, 'uploadForm' => Yii::createObject(UploadForm::className())]);
 }