UserSessionPersistenceInterface
in
Interface for persisting user data in the session.
Tags
Table of Contents
- addUserDataToSession() : void
- Update session container to store data representing a user (used by privacy mode).
- addUserIdToSession() : void
- Update session container to store user ID (used outside of privacy mode).
- clearUserFromSession() : void
- Clear the user data from the session.
- getUserFromSession() : UserEntityInterface|null
- Build a user entity using data from a session container. Return null if user data cannot be found.
- hasUserSessionData() : bool
- Is there user data currently stored in the session container?
Methods
addUserDataToSession()
Update session container to store data representing a user (used by privacy mode).
public
addUserDataToSession(UserEntityInterface $user) : void
Parameters
- $user : UserEntityInterface
-
User to store in session.
Tags
Return values
void —addUserIdToSession()
Update session container to store user ID (used outside of privacy mode).
public
addUserIdToSession(int $id) : void
Parameters
- $id : int
-
User ID
Return values
void —clearUserFromSession()
Clear the user data from the session.
public
clearUserFromSession() : void
Return values
void —getUserFromSession()
Build a user entity using data from a session container. Return null if user data cannot be found.
public
getUserFromSession() : UserEntityInterface|null
Return values
UserEntityInterface|null —hasUserSessionData()
Is there user data currently stored in the session container?
public
hasUserSessionData() : bool