UserService
class UserService (View source)
The user service provides general context information about the currently authenticated backend user.
The methods getters of this class are accessible via the "context.userInformation" variable in security policies and thus are implicitly considered to be part of the public API. This UserService should be replaced by \Neos\Neos\Domain\Service\UserService in the long run.
Properties
protected UserService | $userDomainService | ||
protected WorkspaceRepository | $workspaceRepository | ||
protected string | $defaultLanguageIdentifier | ||
protected Context | $securityContext |
Methods
Returns the current backend user
Returns the current user's personal workspace or null if no user is logged in
Returns the name of the currently logged in user's personal workspace (even if that might not exist at that time).
Returns the stored preferences of a user
Returns the interface language the user selected. Will fall back to the default language defined in settings
Details
User
getBackendUser()
Returns the current backend user
Workspace
getPersonalWorkspace()
Returns the current user's personal workspace or null if no user is logged in
string
getPersonalWorkspaceName()
Returns the name of the currently logged in user's personal workspace (even if that might not exist at that time).
If no user is logged in this method returns null.
mixed
getUserPreference(string $preference)
Returns the stored preferences of a user
string
getInterfaceLanguage()
Returns the interface language the user selected. Will fall back to the default language defined in settings