summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-10-24 18:26:48 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-11-20 18:31:39 +0100
commitcb3af1dce294ab058162b3c4d1a0feb84465dd0b (patch)
tree7eeaf57c690e58771323e6f11e5b4a121d69fcbd /apps/user_ldap/js
parent288acb55a0384b0608b9df0e64dcf62b1fdc7387 (diff)
downloadnextcloud-server-cb3af1dce294ab058162b3c4d1a0feb84465dd0b.tar.gz
nextcloud-server-cb3af1dce294ab058162b3c4d1a0feb84465dd0b.zip
detect user display name attribute and return user count depending on its presence
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/settings.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index fa40aba73b4..93fd97c1e73 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -151,8 +151,10 @@ var LdapWizard = {
ajaxRequests: {},
ajax: function(param, fnOnSuccess, fnOnError, reqID) {
- if(reqID !== undefined) {
+ if(typeof reqID !== 'undefined') {
if(LdapWizard.ajaxRequests.hasOwnProperty(reqID)) {
+ console.log('aborting ' + reqID);
+ console.log(param);
LdapWizard.ajaxRequests[reqID].abort();
}
}
@@ -167,7 +169,7 @@ var LdapWizard = {
}
}
);
- if(reqID !== undefined) {
+ if(typeof reqID !== 'undefined') {
LdapWizard.ajaxRequests[reqID] = request;
}
},
@@ -342,7 +344,7 @@ var LdapWizard = {
},
_countThings: function(method, spinnerID, doneCallback) {
- param = 'action='+method+
+ var param = 'action='+method+
'&ldap_serverconfig_chooser='+
encodeURIComponent($('#ldap_serverconfig_chooser').val());
@@ -371,7 +373,12 @@ var LdapWizard = {
},
countUsers: function(doneCallback) {
- LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback);
+ //we make user counting depending on having a display name attribute
+ var param = 'action=detectUserDisplayNameAttribute' +
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
+
+ LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback);
},
detectEmailAttribute: function() {