# extendify/3.2.2/app/Mcp/Lifecycle.php

Extendify, version 3.2.2. 35 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.2.2/code/app/Mcp/Lifecycle.php
- Raw: https://pluginprobe.com/plugins/extendify/3.2.2/raw/app/Mcp/Lifecycle.php
- Modified: 2026-10-01T15:30:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.2.2/code/app/Mcp/Lifecycle.php#L10-L20`.

```php
<?php

/**
 * Revoking connections on account events.
 */

namespace Extendify\Mcp;

defined('ABSPATH') || die('No direct access.');

/**
 * The one account event a tool's own capability check does not already cover.
 */
class Lifecycle
{
    /**
     * @return void
     */
    public static function register()
    {
        \add_action('after_password_reset', [self::class, 'onPasswordReset']);
    }

    /**
     * @param \WP_User $user - The user who reset their password.
     * @return void
     */
    public static function onPasswordReset($user)
    {
        if ($user instanceof \WP_User) {
            Connections::revokeAll($user->ID);
        }
    }
}

```
