PrincipalUser

final readonly class \TYPO3\CMS\Core\Security\Authorization\PrincipalUser

Implements
UserInterface

Presents a Principal as user of the Symfony security component, so that voters receive the immutable Principal instead of a user authentication object.

The roles are the cumulative SecurityRole cases of the principal role, plus SecurityRole::BACKEND_USER or SecurityRole::FRONTEND_USER, as frontend principals carry the role "user" as well, and one role per group, ROLE_BACKEND_GROUP_ or ROLE_FRONTEND_GROUP_.

Table of Contents

Interfaces

UserInterface

Properties

$principal  : Principal

Methods

__construct()  : mixed
getRoles()  : array<int, string>
getUserIdentifier()  : string
Unique across realms, as a backend and a frontend user may share a username or a uid.
hasRole()  : bool

Properties

Methods

getRoles()

public getRoles() : array<int, string>

Return values

array<int, string>

getUserIdentifier()

Unique across realms, as a backend and a frontend user may share a username or a uid.

public getUserIdentifier() : string

Return values

string
On this page