diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2014-03-25 14:22:39 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2014-03-25 14:22:39 +0100 |
commit | aa5bba2bcce010ecbbbf4df0a63570a66986d846 (patch) | |
tree | 2e4c615e5ab90ec76c0c7d60ef3813aaa6ee16f2 /core/ajax | |
parent | d4c0ac779034a47d4fc8a56e0a96a7d84170e03c (diff) | |
download | nextcloud-server-aa5bba2bcce010ecbbbf4df0a63570a66986d846.tar.gz nextcloud-server-aa5bba2bcce010ecbbbf4df0a63570a66986d846.zip |
'ID' => 'id' and check existence of EMAIL
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/share.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 6bac2867c48..588781556ff 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -268,6 +268,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo if (!is_null($cm) && $cm->isEnabled()) { $contacts = $cm->search($_GET['search'], array('FN', 'EMAIL')); foreach ($contacts as $contact) { + if (!isset($emails = $contact['EMAIL']) { + continue; + } + $emails = $contact['EMAIL']; if (!is_array($emails)) { $emails = array($emails); @@ -275,7 +279,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo foreach($emails as $email) { $result[] = array( - 'id' => $contact['ID'], + 'id' => $contact['id'], 'email' => $email, 'displayname' => $contact['FN'], ); |