diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 5bd92015ad..6f6fa0ba37 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -261,7 +261,7 @@ class SyncService { /** * @param IUser $user */ - public function updateUser($user) { + public function updateUser(IUser $user) { $systemAddressBook = $this->getLocalSystemAddressBook(); $addressBookId = $systemAddressBook['id']; $converter = new Converter($this->accountManager); diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php index b1bd039c65..27b6525be4 100644 --- a/apps/dav/lib/HookManager.php +++ b/apps/dav/lib/HookManager.php @@ -101,7 +101,9 @@ class HookManager { public function postCreateUser($params) { $user = $this->userManager->get($params['uid']); - $this->syncService->updateUser($user); + if ($user instanceof IUser) { + $this->syncService->updateUser($user); + } } public function preDeleteUser($params) {