Interface

eZ\Publish\Core\MVC\Symfony\Security\ReferenceUserInterface

interface ReferenceUserInterface implements UserInterface

Interface for Repository based users, where we only serialize user id / Reference in session values.

Use of user reference allows us to strip api user on serialization to avoid it being sent to session storage, as UserProvider calls {@link UserInterface::setAPIUser()} during refresh stage.

This method and logic implied above will be added to UserInterface in 7.0, where this interface will be deprecated, so for forward compatibility make sure to also implement the method, even if you don't implement this interface.

Methods

User getAPIUser()

setAPIUser(User $apiUser)

from UserInterface
UserReference getAPIUserReference()

Details

at line 33
public User getAPIUser()

Return Value

User

Exceptions

LogicException If api user has not been refreshed yet by UserProvider after being unserialized from session.

in UserInterface at line 29
public setAPIUser(User $apiUser)

Parameters

User $apiUser

at line 25
public UserReference getAPIUserReference()

Return Value

UserReference