Commit b073dbf7 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

Merge branch '40-member-import-creates-duplicates' into 'main'

Resolve "Member Import creates duplicates"

Closes #40

See merge request t3o/t3o_membership!13
parents 430bfefa 2c034b65
...@@ -219,6 +219,12 @@ class ImportMembersCommand extends \Symfony\Component\Console\Command\Command ...@@ -219,6 +219,12 @@ class ImportMembersCommand extends \Symfony\Component\Console\Command\Command
{ {
$queryBuilder = $this->getDatabaseConnection()->getQueryBuilderForTable('tx_t3omembership_domain_model_member'); $queryBuilder = $this->getDatabaseConnection()->getQueryBuilderForTable('tx_t3omembership_domain_model_member');
// remove hidden restriction to find former member
$queryBuilder
->getRestrictions()
->removeByType(\TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction::class)
->removeByType(\TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction::class);
$statement = $queryBuilder->select('uid')->from('tx_t3omembership_domain_model_member')->where($queryBuilder->expr() $statement = $queryBuilder->select('uid')->from('tx_t3omembership_domain_model_member')->where($queryBuilder->expr()
->eq('subscription_no', $queryBuilder->createNamedParameter($subscriptionNo, \PDO::PARAM_INT)))->execute(); ->eq('subscription_no', $queryBuilder->createNamedParameter($subscriptionNo, \PDO::PARAM_INT)))->execute();
$existingMember = $statement->fetch(); $existingMember = $statement->fetch();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment