@@ -165,8 +165,8 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
165165 if (!$ this ->isCurrentUser ($ cloud ) && !$ searchResult ->hasResult ($ userType , $ cloud ->getUser ())) {
166166 $ singleResult = [[
167167 'label ' => $ displayName ,
168- 'uuid ' => $ contact ['UID ' ],
169- 'name ' => $ contact ['FN ' ],
168+ 'uuid ' => $ contact ['UID ' ] ?? $ emailAddress ,
169+ 'name ' => $ contact ['FN ' ] ?? $ displayName ,
170170 'value ' => [
171171 'shareType ' => IShare::TYPE_USER ,
172172 'shareWith ' => $ cloud ->getUser (),
@@ -205,8 +205,8 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
205205 if ($ addToWide && !$ this ->isCurrentUser ($ cloud ) && !$ searchResult ->hasResult ($ userType , $ cloud ->getUser ())) {
206206 $ userResults ['wide ' ][] = [
207207 'label ' => $ displayName ,
208- 'uuid ' => $ contact ['UID ' ],
209- 'name ' => $ contact ['FN ' ],
208+ 'uuid ' => $ contact ['UID ' ] ?? $ emailAddress ,
209+ 'name ' => $ contact ['FN ' ] ?? $ displayName ,
210210 'value ' => [
211211 'shareType ' => IShare::TYPE_USER ,
212212 'shareWith ' => $ cloud ->getUser (),
@@ -226,8 +226,8 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
226226 }
227227 $ result ['exact ' ][] = [
228228 'label ' => $ displayName ,
229- 'uuid ' => $ contact ['UID ' ],
230- 'name ' => $ contact ['FN ' ],
229+ 'uuid ' => $ contact ['UID ' ] ?? $ emailAddress ,
230+ 'name ' => $ contact ['FN ' ] ?? $ displayName ,
231231 'type ' => $ emailAddressType ?? '' ,
232232 'value ' => [
233233 'shareType ' => IShare::TYPE_EMAIL ,
@@ -237,8 +237,8 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
237237 } else {
238238 $ result ['wide ' ][] = [
239239 'label ' => $ displayName ,
240- 'uuid ' => $ contact ['UID ' ],
241- 'name ' => $ contact ['FN ' ],
240+ 'uuid ' => $ contact ['UID ' ] ?? $ emailAddress ,
241+ 'name ' => $ contact ['FN ' ] ?? $ displayName ,
242242 'type ' => $ emailAddressType ?? '' ,
243243 'value ' => [
244244 'shareType ' => IShare::TYPE_EMAIL ,
0 commit comments