eZ\Publish\Core\REST\Server\Controller\User::deleteUser PHP Method

deleteUser() public method

Given user is deleted.
public deleteUser ( $userId ) : eZ\Publish\Core\REST\Server\Values\NoContent
$userId
return eZ\Publish\Core\REST\Server\Values\NoContent
    public function deleteUser($userId)
    {
        $user = $this->userService->loadUser($userId);
        if ($user->id == $this->repository->getCurrentUser()->id) {
            throw new Exceptions\ForbiddenException('Currently authenticated user cannot be deleted');
        }
        $this->userService->deleteUser($user);
        return new Values\NoContent();
    }