controllers/AdminController.php
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);
    }
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);
    }
Confirms the User.
@param integer $id
@param string  $back
@return \yii\web\Response