code: public function actionConfirm($id, $code)
      {
          $user = $this->finder->findUserById($id);
  
          if ($user === null || $this->module->emailChangeStrategy == Module::STRATEGY_INSECURE) {
              throw new NotFoundHttpException;
          }
  
          $user->attemptEmailChange($code);
  
          return $this->redirect(['account']);
      }
docs: Attempts changing user's password.
  @param  integer $id
  @param  string  $code
  @return string
  @throws \yii\web\HttpException