Standalone - Track logged-in user object
Overview
--------
This is a partial solution for running `E2E_Extern_CliRunnerTest::testPermissionLookup()` on Standalone.
Technical Details
-----------------
The test calls:
```
cv ev --user='admin' 'echo json_encode(CRM_Core_Config::singleton()->userPermissionClass->check("administer CiviCRM", 0));'
```
Internally, this command relies on `CRM_Core_BAO_UFMatch::synchronize()` by way of:
https://github.com/civicrm/cv/blob/
59efd9ffefde8dc500643e048d37db90e0de11b7/src/Util/BootTrait.php#L213-L235
Calls to `UFMatch::synchronize($user)` are expected to pass in a user-record.
Before
------
Standalone logins record the active user-ID.
After
------
Standalone logins record the active user-ID and active user-record (which can be supplied to `UFMatch::synchronize()`).