Skip to content

Commit

Permalink
Username autocomplete option in admin menue now also toggles autocomp…
Browse files Browse the repository at this point in the history
…lete for email input (share by e-mail) #26504

(cherry picked from commit 861011c) Backport: #1760
  • Loading branch information
IljaN committed Jan 17, 2017
1 parent ed5e8e2 commit 62b1865
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/ajax/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@
$result = array();
if (isset($_GET['search'])) {
$cm = OC::$server->getContactsManager();
if (!is_null($cm) && $cm->isEnabled()) {

$userEnumerationAllowed = OC::$server->getConfig()
->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') == 'yes';

if (!is_null($cm) && $cm->isEnabled() && $userEnumerationAllowed) {
$contacts = $cm->search((string)$_GET['search'], array('FN', 'EMAIL'));
foreach ($contacts as $contact) {
if (!isset($contact['EMAIL'])) {
Expand Down

0 comments on commit 62b1865

Please sign in to comment.