UserContextService
class UserContextService (View source)
Session-backed identity of the current user (id, username, auth method) and the session storage controllers use. Domain rules read the actor through ActorInterface instead.
Constants
| EXTERNAL_AUTH_METHODS |
Derived from {AuthMethod::isExternal()}; do not list the cases again. |
Methods
No description
No description
No description
No description
The session's auth method as an enum. Unknown or absent reads as SQL.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
__construct(SessionInterface $session)
No description
string|null
getLoggedInUsername()
No description
int|null
getLoggedInUserId()
No description
string|null
getDisplayName()
No description
string|null
getAuthMethod()
No description
AuthMethod
getAuthMethodEnum()
The session's auth method as an enum. Unknown or absent reads as SQL.
getAuthMethod() stays for Twig, which compares the raw string.
string|null
getUserEmail()
No description
string|null
getOAuthAvatarUrl()
No description
bool
isAuthenticated()
No description
string|null
getUserLanguage()
No description
void
setUserLanguage(string $language)
No description
bool
hasSessionData(string $key)
No description
mixed
getSessionData(string $key)
No description
void
setSessionData(string $key, mixed $value)
No description
void
unsetSessionData(string $key)
No description