PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.5.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.5.0
5.12.0 5.13.0 5.13.1 5.11.0 5.10.0 5.9.0 5.8.0 5.8.1 5.7.0 5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 All 47 releases
← All changes | src/Service/PrivacyIntegration.php +3 -27 5.8.1 → 5.5.0 View file →
@@ -10,9 +10,8 @@
10 10
11 11 namespace Forge12\DoubleOptIn\Service;
12 12
13 13 use Forge12\DoubleOptIn\Entity\OptIn;
14 -use Forge12\DoubleOptIn\Repository\OptInMailStatusRepository;
15 14 use Forge12\DoubleOptIn\Repository\OptInRepositoryInterface;
16 15 use Forge12\Shared\LoggerInterface;
17 16
18 17 if ( ! defined( 'ABSPATH' ) ) {
@@ -28,20 +27,11 @@
28 27
29 28 private LoggerInterface $logger;
30 29 private OptInRepositoryInterface $repository;
31 30
32 - /**
33 - * Delivery status of the confirmation mail (5.8.0). Optional so existing
34 - * callers keep working.
35 - *
36 - * @var OptInMailStatusRepository|null
37 - */
38 - private $mailStatus;
39 -
40 - public function __construct( LoggerInterface $logger, OptInRepositoryInterface $repository, ?OptInMailStatusRepository $mailStatus = null ) {
31 + public function __construct( LoggerInterface $logger, OptInRepositoryInterface $repository ) {
41 32 $this->logger = $logger;
42 33 $this->repository = $repository;
43 - $this->mailStatus = $mailStatus;
44 34 }
45 35
46 36 /**
47 37 * Register privacy hooks.
@@ -157,18 +147,8 @@
157 147 'value' => (string) $optIn->getFormId(),
158 148 ),
159 149 );
160 150
161 - if ( $this->mailStatus !== null ) {
162 - $mail = $this->mailStatus->find( $optIn->getId() );
163 - if ( $mail['status'] !== '' ) {
164 - $data[] = array(
165 - 'name' => __( 'Confirmation mail', 'double-opt-in' ),
166 - 'value' => trim( $mail['status'] . ' ' . $mail['at'] . ( $mail['error'] !== '' ? ' — ' . $mail['error'] : '' ) ),
167 - );
168 - }
169 - }
170 -
171 151 $items[] = array(
172 152 'group_id' => 'double-opt-in',
173 153 'group_label' => __( 'Double Opt-In Records', 'double-opt-in' ),
174 154 'item_id' => 'doi-' . $optIn->getId(),
@@ -179,9 +159,9 @@
179 159 $this->logger->info(
180 160 'Personal data exported',
181 161 array(
182 162 'plugin' => 'double-opt-in',
183 - // No address in the log (rules/gdpr.md).
163 + 'email' => $email,
184 164 'count' => count( $items ),
185 165 )
186 166 );
187 167
@@ -212,12 +192,8 @@
212 192 $anonymized = $this->anonymizeOptIn( $optIn );
213 193
214 194 try {
215 195 $this->repository->save( $anonymized );
216 - // The mail error text can quote the address.
217 - if ( $this->mailStatus !== null ) {
218 - $this->mailStatus->clearError( $optIn->getId() );
219 - }
220 196 ++$retained;
221 197 } catch ( \RuntimeException $e ) {
222 198 $this->logger->error(
223 199 'Failed to anonymize OptIn',
@@ -241,9 +217,9 @@
241 217 $this->logger->info(
242 218 'Personal data anonymized',
243 219 array(
244 220 'plugin' => 'double-opt-in',
245 - // No address in the log (rules/gdpr.md).
221 + 'email' => $email,
246 222 'retained' => $retained,
247 223 )
248 224 );
249 225