Revert "Do not list system users in contacts menu if sharing autocompletion is disabled"

This reverts commit 56a9084dd2.
pull/5585/head
Lukas Reschke 2017-09-15 14:32:27 +07:00
parent 5896176d69
commit 6d02fe06c6
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 2 additions and 8 deletions

@ -50,13 +50,7 @@ $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove',
$cm = \OC::$server->getContactsManager();
$cm->register(function() use ($cm, $app) {
$user = \OC::$server->getUserSession()->getUser();
if (is_null($user)) {
return;
if (!is_null($user)) {
$app->setupContactsProvider($cm, $user->getUID());
}
if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') !== 'yes') {
// Don't include system users
// This prevents user enumeration in the contacts menu and the mail app
return;
}
$app->setupContactsProvider($cm, $user->getUID());
});