diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index faa6c52b2aa6b93ac97ec12aac3d439cf621e46d..6f9468c4e79432230f730c1ff85e8d250252f0da 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -82,7 +82,7 @@ OC.Share={ html += '</div>'; $(html).appendTo(appendTo); if (OC.Share.usersAndGroups.length < 1) { - $.getJSON(OC.filePath('files_sharing', 'ajax', 'userautocomplete.php'), function(users) { + $.ajax({type: 'GET', url: OC.filePath('files_sharing', 'ajax', 'userautocomplete.php'), async: false, success: function(users) { if (users) { OC.Share.usersAndGroups = users; $.each(users, function(index, user) { @@ -90,7 +90,7 @@ OC.Share={ }); $('#share_with').trigger('liszt:updated'); } - }); + }}); } else { $.each(OC.Share.usersAndGroups, function(index, user) { $(user).appendTo('#share_with');