← All changes
|
app/Services/CustomerIdentity/EmailVerificationService.php
+4
-4
trunk
→
1.6.5
View file →
| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | private static $passwordResetProof = []; |
| 18 | 18 | |
| 19 | 19 | public static function capturePasswordResetProof($user): void |
| 20 | 20 | { |
| 21 | - unset(self::$passwordResetProof[$user->ID]); | |
| 21 | + unset(static::$passwordResetProof[$user->ID]); | |
| 22 | 22 | $cookie = Arr::get($_COOKIE, 'wp-resetpass-' . COOKIEHASH, ''); |
| 23 | 23 | $postedKey = Arr::get($_POST, 'rp_key', ''); |
| 24 | 24 | if (!is_string($cookie) || !is_string($postedKey) || !$postedKey) { |
| 25 | 25 | return; |
| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | $validated = check_password_reset_key($parts[1], $parts[0]); |
| 33 | 33 | if (is_wp_error($validated) || (int) $validated->ID !== (int) $user->ID) { |
| 34 | 34 | return; |
| 35 | 35 | } |
| 36 | - self::$passwordResetProof[$user->ID] = [ | |
| 36 | + static::$passwordResetProof[$user->ID] = [ | |
| 37 | 37 | 'email' => $validated->user_email, |
| 38 | 38 | 'password_hash' => $validated->user_pass, |
| 39 | 39 | ]; |
| 40 | 40 | } |
| @@ -40,10 +40,10 @@ | ||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public static function verifyAfterPasswordReset($user): void |
| 43 | 43 | { |
| 44 | - $proof = self::$passwordResetProof[$user->ID] ?? null; | |
| 45 | - unset(self::$passwordResetProof[$user->ID]); | |
| 44 | + $proof = static::$passwordResetProof[$user->ID] ?? null; | |
| 45 | + unset(static::$passwordResetProof[$user->ID]); | |
| 46 | 46 | if (!$proof) { |
| 47 | 47 | return; |
| 48 | 48 | } |
| 49 | 49 | clean_user_cache($user->ID); |