code: public function actionConfirm($id, $back = 'index')
      {
          $this->findModel($id)->confirm();
          \Yii::$app->getSession()->setFlash('success', \Yii::t('user', 'User has been confirmed'));
          $url = $back == 'index' ? ['index'] : ['update', 'id' => $id];
          return $this->redirect($url);
      }
docs: Confirms the User.
  @param integer $id
  @param string  $back
  @return \yii\web\Response