Class

eZ\Publish\Core\REST\Server\Controller\User

class User extends Controller

User controller.

Methods

setInputDispatcher(Dispatcher $inputDispatcher)

from Controller
setRouter(RouterInterface $router)

from Controller
setRepository(Repository $repository)

from Controller
setRequestParser(RequestParser $requestParser)

from Controller
__construct(UserService $userService, RoleService $roleService, ContentService $contentService, ContentTypeService $contentTypeService, LocationService $locationService, SectionService $sectionService, Repository $repository)

Construct controller.

PermanentRedirect loadRootUserGroup()

Redirects to the root user group.

RestUserGroup loadUserGroup($groupPath $groupPath)

Loads a user group for the given path.

RestUser loadUser($userId $userId)

Loads a user for the given ID.

CreatedUserGroup createUserGroup($groupPath, Request $request)

Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups.

CreatedUser createUser($groupPath, Request $request)

Create a new user group in the given group.

RestUserGroup updateUserGroup($groupPath, Request $request)

Updates a user group.

RestUser updateUser($userId, Request $request)

Updates a user.

NoContent deleteUserGroup($groupPath $groupPath)

Given user group is deleted.

NoContent deleteUser($userId $userId)

Given user is deleted.

UserList|UserRefList loadUsers(Request $request)

Loads users.

verifyUsers(Request $request)

RestUser[] loadUsersAssignedToRole(mixed $roleId)

Loads a list of users assigned to role.

UserGroupList|UserGroupRefList loadUserGroups(Request $request)

Loads user groups.

RestUserGroup loadUserGroupByRemoteId(Request $request)

Loads a user group by its remote ID.

RestUserGroup[] loadUserGroupsAssignedToRole(mixed $roleId)

Loads a list of user groups assigned to role.

VersionList loadUserDrafts($userId, Request $request)

Loads drafts assigned to user.

ResourceCreated moveUserGroup($groupPath, Request $request)

Moves the user group to another parent.

UserGroupList|UserGroupRefList loadSubUserGroups($groupPath, Request $request)

Returns a list of the sub groups.

UserGroupRefList loadUserGroupsOfUser($userId, Request $request)

Returns a list of user groups the user belongs to.

UserList|UserRefList loadUsersFromGroup($groupPath, Request $request)

Loads the users of the group with the given path.

UserGroupRefList unassignUserFromUserGroup($userId $userId, $groupPath $groupPath)

Unassigns the user from a user group.

UserGroupRefList assignUserToUserGroup($userId, Request $request)

Assigns the user to a user group.

UserSession|Conflict createSession(Request $request)

Creates a new session based on the credentials provided as POST parameters.

UserSession refreshSession($sessionId, Request $request)

Refresh given session.

DeletedUserSession|Response deleteSession($sessionId, Request $request)

Deletes given session.

setTokenStorage(TokenStorageInterface $csrfTokenStorage)

setSessionController(SessionController $sessionController)

Details

in Controller at line 45
public setInputDispatcher(Dispatcher $inputDispatcher)

Parameters

Dispatcher $inputDispatcher

in Controller at line 50
public setRouter(RouterInterface $router)

Parameters

RouterInterface $router

in Controller at line 55
public setRepository(Repository $repository)

Parameters

Repository $repository

in Controller at line 60
public setRequestParser(RequestParser $requestParser)

Parameters

RequestParser $requestParser

at line 108
public __construct(UserService $userService, RoleService $roleService, ContentService $contentService, ContentTypeService $contentTypeService, LocationService $locationService, SectionService $sectionService, Repository $repository)

Construct controller.

Parameters

UserService $userService
RoleService $roleService
ContentService $contentService
ContentTypeService $contentTypeService
LocationService $locationService
SectionService $sectionService
Repository $repository

at line 131
public PermanentRedirect loadRootUserGroup()

Redirects to the root user group.

Return Value

PermanentRedirect

at line 146
public RestUserGroup loadUserGroup($groupPath $groupPath)

Loads a user group for the given path.

Parameters

$groupPath $groupPath

Return Value

RestUserGroup

at line 183
public RestUser loadUser($userId $userId)

Loads a user for the given ID.

Parameters

$userId $userId

Return Value

RestUser

at line 230
public CreatedUserGroup createUserGroup($groupPath, Request $request)

Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups.

Parameters

$groupPath
Request $request

Return Value

CreatedUserGroup

Exceptions

BadRequestException

at line 274
public CreatedUser createUser($groupPath, Request $request)

Create a new user group in the given group.

Parameters

$groupPath
Request $request

Return Value

CreatedUser

Exceptions

ForbiddenException

at line 318
public RestUserGroup updateUserGroup($groupPath, Request $request)

Updates a user group.

Parameters

$groupPath
Request $request

Return Value

RestUserGroup

at line 368
public RestUser updateUser($userId, Request $request)

Updates a user.

Parameters

$userId
Request $request

Return Value

RestUser

at line 414
public NoContent deleteUserGroup($groupPath $groupPath)

Given user group is deleted.

Parameters

$groupPath $groupPath

Return Value

NoContent

Exceptions

ForbiddenException

at line 444
public NoContent deleteUser($userId $userId)

Given user is deleted.

Parameters

$userId $userId

Return Value

NoContent

Exceptions

ForbiddenException

at line 462
public UserList|UserRefList loadUsers(Request $request)

Loads users.

Parameters

Request $request

Return Value

UserList|UserRefList

at line 505
public verifyUsers(Request $request)

Parameters

Request $request

at line 520
public RestUser[] loadUsersAssignedToRole(mixed $roleId)

Loads a list of users assigned to role.

Parameters

mixed $roleId

Return Value

RestUser[]

at line 555
public UserGroupList|UserGroupRefList loadUserGroups(Request $request)

Loads user groups.

Parameters

Request $request

Return Value

UserGroupList|UserGroupRefList

at line 593
public RestUserGroup loadUserGroupByRemoteId(Request $request)

Loads a user group by its remote ID.

Parameters

Request $request

Return Value

RestUserGroup

at line 616
public RestUserGroup[] loadUserGroupsAssignedToRole(mixed $roleId)

Loads a list of user groups assigned to role.

Parameters

mixed $roleId

Return Value

RestUserGroup[]

at line 650
public VersionList loadUserDrafts($userId, Request $request)

Loads drafts assigned to user.

Parameters

$userId
Request $request

Return Value

VersionList

at line 668
public ResourceCreated moveUserGroup($groupPath, Request $request)

Moves the user group to another parent.

Parameters

$groupPath
Request $request

Return Value

ResourceCreated

Exceptions

ForbiddenException

at line 716
public UserGroupList|UserGroupRefList loadSubUserGroups($groupPath, Request $request)

Returns a list of the sub groups.

Parameters

$groupPath
Request $request

Return Value

UserGroupList|UserGroupRefList

at line 772
public UserGroupRefList loadUserGroupsOfUser($userId, Request $request)

Returns a list of user groups the user belongs to.

The returned list includes the resources for unassigning a user group if the user is in multiple groups.

Parameters

$userId
Request $request

Return Value

UserGroupRefList

at line 812
public UserList|UserRefList loadUsersFromGroup($groupPath, Request $request)

Loads the users of the group with the given path.

Parameters

$groupPath
Request $request

Return Value

UserList|UserRefList

at line 869
public UserGroupRefList unassignUserFromUserGroup($userId $userId, $groupPath $groupPath)

Unassigns the user from a user group.

Parameters

$userId $userId
$groupPath $groupPath

Return Value

UserGroupRefList

Exceptions

ForbiddenException

at line 920
public UserGroupRefList assignUserToUserGroup($userId, Request $request)

Assigns the user to a user group.

Parameters

$userId
Request $request

Return Value

UserGroupRefList

Exceptions

ForbiddenException

at line 981
public UserSession|Conflict createSession(Request $request)

Creates a new session based on the credentials provided as POST parameters.

Parameters

Request $request

Return Value

UserSession|Conflict

Exceptions

UnauthorizedException If the login or password are incorrect or invalid CSRF

at line 1002
public UserSession refreshSession($sessionId, Request $request)

Refresh given session.

Parameters

$sessionId
Request $request

Return Value

UserSession

Exceptions

UnauthorizedException If the CSRF token is missing or invalid.

at line 1024
public DeletedUserSession|Response deleteSession($sessionId, Request $request)

Deletes given session.

Parameters

$sessionId
Request $request

Return Value

DeletedUserSession|Response

Exceptions

UnauthorizedException If the CSRF token is missing or invalid.
RestNotFoundException

at line 1048
public setTokenStorage(TokenStorageInterface $csrfTokenStorage)

Parameters

TokenStorageInterface $csrfTokenStorage

at line 1058
public setSessionController(SessionController $sessionController)

Parameters

SessionController $sessionController