{"record":{"id":"d0c644359e27263e","repo":"nextcloud/server","slug":"user-user-is-unknown-d0c644","errorCode":null,"errorMessage":"User <$user> is unknown.","messagePattern":"User <\\$user> is unknown\\.","errorType":"console","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"apps/dav/lib/Command/DeleteCalendar.php","lineNumber":64,"sourceCode":"\t\t\t->addOption('birthday',\n\t\t\t\tnull,\n\t\t\t\tInputOption::VALUE_NONE,\n\t\t\t\t'Delete the birthday calendar')\n\t\t\t->addOption('force',\n\t\t\t\t'f',\n\t\t\t\tInputOption::VALUE_NONE,\n\t\t\t\t'Force delete skipping trashbin');\n\t}\n\n\t#[\\Override]\n\tprotected function execute(\n\t\tInputInterface $input,\n\t\tOutputInterface $output,\n\t): int {\n\t\t/** @var string $user */\n\t\t$user = $input->getArgument('uid');\n\t\tif (!$this->userManager->userExists($user)) {\n\t\t\tthrow new \\InvalidArgumentException(\n\t\t\t\t'User <' . $user . '> is unknown.');\n\t\t}\n\n\t\t$birthday = $input->getOption('birthday');\n\t\tif ($birthday !== false) {\n\t\t\t$name = BirthdayService::BIRTHDAY_CALENDAR_URI;\n\t\t} else {\n\t\t\t/** @var string $name */\n\t\t\t$name = $input->getArgument('name');\n\t\t\tif (!$name) {\n\t\t\t\tthrow new \\InvalidArgumentException(\n\t\t\t\t\t'Please specify a calendar name or --birthday');\n\t\t\t}\n\t\t}\n\n\t\t$calendarInfo = $this->calDav->getCalendarByUri(\n\t\t\t'principals/users/' . $user,\n\t\t\t$name);","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Command/DeleteCalendar.php#L46-L82","documentation":"InvalidArgumentException from the occ dav:delete-calendar command when the required uid argument does not match an existing user. It aborts before resolving the birthday option or the calendar name.","triggerScenarios":"occ dav:delete-calendar <uid> [<name>] [--birthday] [--force] with a uid that is misspelled, deleted, or given as an email address.","commonSituations":"Cleanup scripts run after users were already deleted; copy-pasted uids from another environment; case mismatches in LDAP-backed ids.","solutions":["Confirm the id with occ user:list (or occ user:info <uid>) and re-run","Run cleanup before deleting the user, or skip already-deleted users in scripts","Quote the uid to avoid shell interpretation of dots or dashes"],"exampleFix":"# before\nocc dav:delete-calendar jdoe_example personal\n# after\nocc user:list\nocc dav:delete-calendar jdoe personal","handlingStrategy":"validation","validationCode":"#!/bin/bash\nuid=\"$1\"\nocc user:info \"$uid\" >/dev/null 2>&1 || { echo \"unknown user: $uid\" >&2; exit 1; }\nocc dav:delete-calendar \"$uid\" \"$2\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run per-user cleanup before deleting the user","Skip already-deleted users in batch jobs instead of letting the command fail"],"tags":["occ","cli","caldav","user-not-found","cleanup"],"backgroundTag":"user-not-found","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}