PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
extendify / app / Mcp / Lifecycle.php

Lifecycle.php in Extendify 3.2.2, at app/Mcp/Lifecycle.php

35 lines 669 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Revoking connections on account events.
5 */
6
7 namespace Extendify\Mcp;
8
9 defined('ABSPATH') || die('No direct access.');
10
11 /**
12 * The one account event a tool's own capability check does not already cover.
13 */
14 class Lifecycle
15 {
16 /**
17 * @return void
18 */
19 public static function register()
20 {
21 \add_action('after_password_reset', [self::class, 'onPasswordReset']);
22 }
23
24 /**
25 * @param \WP_User $user - The user who reset their password.
26 * @return void
27 */
28 public static function onPasswordReset($user)
29 {
30 if ($user instanceof \WP_User) {
31 Connections::revokeAll($user->ID);
32 }
33 }
34 }
35