Skip to content

Commit

Permalink
do not check for subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Nov 26, 2020
1 parent fd4b64e commit da1d4e5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Gateway/KlickTippGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,11 @@ protected function subscribe(Message $message, array $tokens): bool
throw new KlickTippGatewayException('Invalid email address given.');
}

$kt = $this->getConnector();

$subscriberId = $kt->subscriber_search($email);
$this->checkError($kt);

if (!empty($subscriberId)) {
System::log('Klick-Tipp subscriber with email "'.$email.'" already existent', __METHOD__, TL_GENERAL);

return true;
}

$listId = \Haste\Util\StringUtil::recursiveReplaceTokensAndTags($message->kt_list_id, $tokens) ?: 0;
$tagId = $this->getTagId($message, $tokens) ?: 0;
$fields = $this->getParameters($message, $tokens);

$kt = $this->getConnector();
$kt->subscribe($email, $listId, $tagId, $fields);
$this->checkError($kt);

Expand Down

0 comments on commit da1d4e5

Please sign in to comment.