public function unassignRoleFromUser($userId, $roleId)
    {
        $user = $this->userService->loadUser($userId);
        $role = $this->roleService->loadRole($roleId);

        $this->roleService->unassignRoleFromUser($role, $user);

        $roleAssignments = $this->roleService->getRoleAssignmentsForUser($user);

        return new Values\RoleAssignmentList($roleAssignments, $user->id);
    }
public function unassignRoleFromUser($userId, $roleId)
    {
        $user = $this->userService->loadUser($userId);
        $role = $this->roleService->loadRole($roleId);

        $this->roleService->unassignRoleFromUser($role, $user);

        $roleAssignments = $this->roleService->getRoleAssignmentsForUser($user);

        return new Values\RoleAssignmentList($roleAssignments, $user->id);
    }
public function unassignRoleFromUser ( $ userId , $ roleId ) { $ user = $ this -> userService -> loadUser ( $ userId ) ; $ role = $ this -> roleService -> loadRole ( $ roleId ) ; $ this -> roleService -> unassignRoleFromUser ( $ role , $ user ) ; $ roleAssignments = $ this -> roleService -> getRoleAssignmentsForUser ( $ user ) ; return new Values \ RoleAssignmentList ( $ roleAssignments , $ user -> id ) ; }
Un-assigns role from user.

@param $userId
@param $roleId

@return \eZ\Publish\Core\REST\Server\Values\RoleAssignmentList
Un - assigns role from user .