diff --git a/apps/dav/command/migratecalendars.php b/apps/dav/command/migratecalendars.php index 5e7f6e9b69..d887309ac3 100644 --- a/apps/dav/command/migratecalendars.php +++ b/apps/dav/command/migratecalendars.php @@ -61,8 +61,8 @@ class MigrateCalendars extends Command { protected function execute(InputInterface $input, OutputInterface $output) { $this->service->setup(); - if ($input->hasArgument('user')) { - $user = $input->getArgument('user'); + $user = $input->getArgument('user'); + if (!is_null($user)) { if (!$this->userManager->userExists($user)) { throw new \InvalidArgumentException("User <$user> in unknown."); } diff --git a/apps/dav/command/syncbirthdaycalendar.php b/apps/dav/command/syncbirthdaycalendar.php index 66ab540b9a..90a73a3eeb 100644 --- a/apps/dav/command/syncbirthdaycalendar.php +++ b/apps/dav/command/syncbirthdaycalendar.php @@ -61,8 +61,8 @@ class SyncBirthdayCalendar extends Command { * @param OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { - if ($input->hasArgument('user')) { - $user = $input->getArgument('user'); + $user = $input->getArgument('user'); + if (!is_null($user)) { if (!$this->userManager->userExists($user)) { throw new \InvalidArgumentException("User <$user> in unknown."); }