UserContextService
class UserContextService (View source)
Constants
| EXTERNAL_AUTH_METHODS |
Derived from {AuthMethod::isExternal()}; do not list the cases again. |
Methods
No description
No description
No description
No description
The name to record as the actor of this request. An API request that also carries a browser session is attributed to the API principal, not the session.
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
static void
setApiUserContext(int $userId, string|null $username)
No description
static void
clearApiUserContext()
No description
string|null
getLoggedInUsername()
No description
int|null
getLoggedInUserId()
No description
string|null
getActingUsername()
The name to record as the actor of this request. An API request that also carries a browser session is attributed to the API principal, not the session.
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