Commit 765cff49 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #23507 from owncloud/fix-23496-master

Avoid fatal php error dring cron execution
parents 6aa658e2 765c64c7
......@@ -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());
}
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment