43 throw new LogicException(
"User does not exist");
45 if (!$this->positionRepo->getSingle($position_id,
'id') instanceof
ilOrgUnitPosition) {
46 throw new LogicException(
"Position does not exist");
49 throw new LogicException(
"OrgUnit does not exist");
51 $assignment = $this->assignmentRepo->find(
$user_id, $position_id, $orgu_ref_id);
53 $this->assignmentRepo->delete($assignment);
55 $this->
addError(
"No assignment found");
67 return "removeUserFromPositionInOrgUnit";
85 return "Removes a user from a position in a orgunit";
addError(string $message)
Class AddUserIdToPositionInOrgUnit.
getDocumentation()
Get the documentation of this method.
getAdditionalInputParams()
getOutputParams()
Get the output parameters in the same format as the input parameters.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...