LegacyUserPrincipalFactory

final class \TYPO3\CMS\Core\Authentication\Pipeline\LegacyUserPrincipalFactory

Builds a Principal snapshot from a legacy user authentication object, for the authenticators as well as for authorization decisions on behalf of any backend user: isGrantedForUser(new PrincipalUser($principal), ...).

Only needed during the migration period while authentication is still performed by the legacy user objects.

A backend user object is registered for its principal in the LegacyBackendUserRegistry, so that decisions are taken on the group data of that object, as the access checks of BackendUserAuthentication do. The role is BackendUserAuthentication::getRole() of the object itself.

The principal of a user object is built once, and anew only when the user, its role, groups, switch user mode or group data changed.

Table of Contents

Methods

__construct()  : mixed
fromUser()  : Principal|null
Returns null for an anonymous user, and for a switch user session whose original user cannot be resolved: a principal of the switched user without the impersonating user is never established.

Methods

On this page