public function loadUsersAssignedToRole($roleId)
    {
        $role = $this->roleService->loadRole($roleId);
        $roleAssignments = $this->roleService->getRoleAssignments($role);

        $restUsers = array();

        foreach ($roleAssignments as $roleAssignment) {
            if ($roleAssignment instanceof UserRoleAssignment) {
                $restUsers[] = $this->buildRestUserObject($roleAssignment->getUser());
            }
        }

        return $restUsers;
    }
public function loadUsersAssignedToRole($roleId)
    {
        $role = $this->roleService->loadRole($roleId);
        $roleAssignments = $this->roleService->getRoleAssignments($role);

        $restUsers = array();

        foreach ($roleAssignments as $roleAssignment) {
            if ($roleAssignment instanceof UserRoleAssignment) {
                $restUsers[] = $this->buildRestUserObject($roleAssignment->getUser());
            }
        }

        return $restUsers;
    }
public function loadUsersAssignedToRole ( $ roleId ) { $ role = $ this -> roleService -> loadRole ( $ roleId ) ; $ roleAssignments = $ this -> roleService -> getRoleAssignments ( $ role ) ; $ restUsers = array ( ) ; foreach ( $ roleAssignments as $ roleAssignment ) { if ( $ roleAssignment instanceof UserRoleAssignment ) { $ restUsers [ ] = $ this -> buildRestUserObject ( $ roleAssignment -> getUser ( ) ) ; } } return $ restUsers ; }
Loads a list of users assigned to role.

@param mixed $roleId

@return \eZ\Publish\Core\REST\Server\Values\RestUser[]
Loads a list of users assigned to role .