code: public function actionConfirm($id, $code)
      {
          $user = $this->finder->findUserById($id);
  
          if ($user === null || $this->module->enableConfirmation == false) {
              throw new NotFoundHttpException;
          }
  
          $user->attemptConfirmation($code);
  
          return $this->render('/message', [
              'title'  => \Yii::t('user', 'Account confirmation'),
              'module' => $this->module,
          ]);
      }
docs: Confirms user's account. If confirmation was successful logs the user and shows success message. Otherwise
  shows error message.
  @param  integer $id
  @param  string  $code
  @return string
  @throws \yii\web\HttpException