/**
  * Checks, if a valid auth code was submitted and invalidates it
  *
  * @return array the GET/POST data array
  */
 public function process()
 {
     $authCode = $this->utils->getAuthCode();
     if (empty($authCode)) {
         $this->utilityFuncs->throwException('validateauthcode_insufficient_params');
     }
     $authCodeData = $this->utils->getAuthCodeDataFromDB($authCode);
     if (!isset($authCodeData)) {
         $this->utilityFuncs->throwException('validateauthcode_no_record_found');
     }
     $this->utils->clearAuthCodeFromSession();
     $this->authCodeRepository->clearAssociatedAuthCodes($authCodeData);
     $this->gp = $this->utils->clearAuthCodeFromGP($this->gp);
     return $this->gp;
 }
 /**
  * Checks, if a valid auth code was submitted and deletes the referenced record
  * from the database
  *
  * @return array the GET/POST data array
  */
 public function process()
 {
     $submittedAuthCode = $this->utils->getAuthCode();
     if (empty($submittedAuthCode)) {
         $this->utilityFuncs->throwException('validateauthcode_insufficient_params');
     }
     $authCode = $this->utils->getAuthCodeDataFromDB($submittedAuthCode);
     if (!isset($authCode)) {
         $this->utilityFuncs->throwException('validateauthcode_no_record_found');
     }
     $forceDeletion = TRUE;
     if (intval($this->settings['markAsDeleted'])) {
         $forceDeletion = FALSE;
     }
     $this->authCodeRecordRepository->removeAssociatedRecord($authCode, $forceDeletion);
     $this->authCodeRepository->clearAssociatedAuthCodes($authCode);
     $this->utils->clearAuthCodeFromSession();
     $this->gp = $this->utils->clearAuthCodeFromGP($this->gp);
     return $this->gp;
 }