public function actionConfirm($id) {
    $model = $this->findModel($id);
    $event = $this->getUserEvent($model);

    $this->trigger(self::EVENT_BEFORE_CONFIRM, $event);
    $model->confirm();
    $this->trigger(self::EVENT_AFTER_CONFIRM, $event);

    Yii::$app->getSession()->setFlash('success', Yii::t('users', 'User has been confirmed'));

    return $this->redirect(Url::previous('actions-redirect'));
  }