{"record":{"id":"bb9c1d88a8a0f91d","repo":"nextcloud/server","slug":"user-user-in-unknown-bb9c1d","errorCode":null,"errorMessage":"User <$user> in unknown.","messagePattern":"User <\\$user> in unknown\\.","errorType":"console","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"apps/dav/lib/Command/SyncBirthdayCalendar.php","lineNumber":47,"sourceCode":"\n\t#[\\Override]\n\tprotected function configure(): void {\n\t\t$this\n\t\t\t->setName('dav:sync-birthday-calendar')\n\t\t\t->setDescription('Synchronizes the birthday calendar')\n\t\t\t->addArgument('user',\n\t\t\t\tInputArgument::OPTIONAL,\n\t\t\t\t'User for whom the birthday calendar will be synchronized');\n\t}\n\n\t#[\\Override]\n\tprotected function execute(InputInterface $input, OutputInterface $output): int {\n\t\t$this->verifyEnabled();\n\n\t\t$user = $input->getArgument('user');\n\t\tif (!is_null($user)) {\n\t\t\tif (!$this->userManager->userExists($user)) {\n\t\t\t\tthrow new \\InvalidArgumentException(\"User <$user> in unknown.\");\n\t\t\t}\n\n\t\t\t// re-enable the birthday calendar in case it's called directly with a user name\n\t\t\t$isEnabled = $this->config->getUserValue($user, 'dav', 'generateBirthdayCalendar', 'yes');\n\t\t\tif ($isEnabled !== 'yes') {\n\t\t\t\t$this->config->setUserValue($user, 'dav', 'generateBirthdayCalendar', 'yes');\n\t\t\t\t$output->writeln(\"Re-enabling birthday calendar for $user\");\n\t\t\t}\n\n\t\t\t$output->writeln(\"Start birthday calendar sync for $user\");\n\t\t\t$this->birthdayService->syncUser($user);\n\t\t\treturn self::SUCCESS;\n\t\t}\n\t\t$output->writeln('Start birthday calendar sync for all users ...');\n\t\t$p = new ProgressBar($output);\n\t\t$p->start();\n\t\t$this->userManager->callForSeenUsers(function ($user) use ($p): void {\n\t\t\t$p->advance();","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Command/SyncBirthdayCalendar.php#L29-L65","documentation":"Thrown by occ dav:sync-birthday-calendar when the optional user argument is provided but does not exist (IUserManager::userExists() false). The user argument is OPTIONAL: omitted, the command syncs birthday calendars for all users; the error only fires for an explicit unknown uid. Note the message itself contains a typo ('in unknown' instead of 'is unknown'). When a valid uid is passed the command also re-enables the per-user generateBirthdayCalendar flag before syncing.","triggerScenarios":"`occ dav:sync-birthday-calendar <uid>` with a typo'd or deleted user id. Running it with no argument never triggers this error.","commonSituations":"Cron/scripts pinned to a user that was deleted; typo; external backend user not resolved.","solutions":["Verify the uid with `occ user:info <uid>`","Drop the argument to sync every user, or fix the uid and re-run","For external backends, ensure the user is visible before scheduling the per-user sync"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nuid=\"$1\"\nif [ -n \"$uid\" ]; then\n  occ user:info \"$uid\" >/dev/null 2>&1 || { echo \"Unknown user: $uid\" >&2; exit 1; }\nfi\nocc dav:sync-birthday-calendar ${uid:-}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit the user argument to sync all users instead of guessing ids","Update cron job definitions when referenced users are deleted","Note the command re-enables the per-user flag when given an explicit uid"],"tags":["dav","calendar","birthday","occ","cli","user-validation"],"backgroundTag":"unknown-user-id","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}