PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 All 50 releases
← All changes | app/Hooks/Handlers/UserHandler.php +10 -0 1.6.6 → 1.7.0 View file →
@@ -24,8 +24,14 @@
24 24 }
25 25
26 26 public function handleWpUserProfileUpdated($userId, $oldData, $newData = [])
27 27 {
28 + // State is recorded only while the store requires verification; accounts
29 + // without it are treated as existing accounts if verification is enabled later.
30 + if (!EmailVerificationService::isEnabled()) {
31 + return;
32 + }
33 +
28 34 $user = $userId ? get_userdata($userId) : false;
29 35 $oldEmail = is_object($oldData) && isset($oldData->user_email) ? wp_unslash($oldData->user_email) : '';
30 36 if (!$user || EmailVerificationService::isSame($oldEmail, $user->user_email)) {
31 37 return;
@@ -83,8 +89,12 @@
83 89 }
84 90
85 91 public function userRegistrationHandler($userId)
86 92 {
93 + if (!EmailVerificationService::isEnabled()) {
94 + return;
95 + }
96 +
87 97 $user = $userId ? get_userdata($userId) : false;
88 98 if ($user) {
89 99 EmailVerificationService::markPending((int) $userId, $user->user_email);
90 100 }