user_pass, (int) $user_id ) ) { return; } Utils::forget_remembered_devices( (int) $user_id ); } /** * Revoke trusted devices when a profile update changes the password hash. * * Covers password changes from the profile screen and wp_update_user(). * * @param int $user_id User ID. * @param WP_User $old_user_data User data before the update. * @return void */ public static function on_profile_update( $user_id, $old_user_data ): void { $user = get_userdata( (int) $user_id ); if ( $user instanceof WP_User && $old_user_data instanceof WP_User && $old_user_data->user_pass !== $user->user_pass ) { Utils::forget_remembered_devices( (int) $user_id ); } } }