<?php declare(strict_types=1); // -*- coding: utf-8 -*-

/**
 * Plugin Name: Plugin A
 */

add_action(
    'plugins_loaded',
    function() {
        add_filter(
            'determine_current_user',
            function($user_id) {
                // Do something here with $user_id.
                return $user_id;
            }
        );
        $user = wp_get_current_user();
    },
    5
);
