summaryrefslogtreecommitdiffstats
path: root/apps/dav/appinfo/app.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-23 11:37:00 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-23 11:37:00 +0100
commit765c64c73eb455ed86bbd2dddba2f81877dc0ab8 (patch)
tree20e51e7bd89f4ef2a3a34ad49d0b3cd0b0eda90a /apps/dav/appinfo/app.php
parent9fc371e436e8f99c862e587efe1b682cb0923e83 (diff)
downloadnextcloud-server-765c64c73eb455ed86bbd2dddba2f81877dc0ab8.tar.gz
nextcloud-server-765c64c73eb455ed86bbd2dddba2f81877dc0ab8.zip
fixes #23496
Diffstat (limited to 'apps/dav/appinfo/app.php')
-rw-r--r--apps/dav/appinfo/app.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php
index 17596ffecbb..d85a3583bf1 100644
--- a/apps/dav/appinfo/app.php
+++ b/apps/dav/appinfo/app.php
@@ -46,6 +46,8 @@ $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove',
$cm = \OC::$server->getContactsManager();
$cm->register(function() use ($cm, $app) {
- $userId = \OC::$server->getUserSession()->getUser()->getUID();
- $app->setupContactsProvider($cm, $userId);
+ $user = \OC::$server->getUserSession()->getUser();
+ if (!is_null($user)) {
+ $app->setupContactsProvider($cm, $user->getUID());
+ }
});