Always count WP user list towards the limit
[MAILPOET-3143]
This commit is contained in:
committed by
Veljko V
parent
8de40ffb99
commit
86add53c30
@ -37,24 +37,6 @@ class SubscribersRepository extends Repository {
|
||||
return (int)$query->getSingleScalarResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalSubscribersWithoutWPUsers() {
|
||||
$query = $this->entityManager
|
||||
->createQueryBuilder()
|
||||
->select('count(n.id)')
|
||||
->from(SubscriberEntity::class, 'n')
|
||||
->where('n.deletedAt IS NULL AND n.status IN (:statuses) AND n.wpUserId IS NULL')
|
||||
->setParameter('statuses', [
|
||||
SubscriberEntity::STATUS_SUBSCRIBED,
|
||||
SubscriberEntity::STATUS_UNCONFIRMED,
|
||||
SubscriberEntity::STATUS_INACTIVE,
|
||||
])
|
||||
->getQuery();
|
||||
return (int)$query->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function findBySegment(int $segmentId): array {
|
||||
return $this->entityManager
|
||||
->createQueryBuilder()
|
||||
|
Reference in New Issue
Block a user