diff --git a/apps/user_ldap/js/wizard/wizardTabAbstractFilter.js b/apps/user_ldap/js/wizard/wizardTabAbstractFilter.js index 702c30a5a6..16920199dc 100644 --- a/apps/user_ldap/js/wizard/wizardTabAbstractFilter.js +++ b/apps/user_ldap/js/wizard/wizardTabAbstractFilter.js @@ -158,9 +158,12 @@ OCA = OCA || {}; /** * sets the selected groups * - * @param {Array} groups + * @param {string} groups */ setGroups: function(groups) { + if(typeof groups === 'string') { + groups = groups.split("\n"); + } if(!this.isComplexGroupChooser) { this.setElementValue(this.getGroupsItem().$element, groups); this.getGroupsItem().$element.multiselect('refresh'); @@ -224,10 +227,10 @@ OCA = OCA || {}; $selectedGroups, $(this.tabID).find('.ldapManyGroupsSearch') )); } else { - if(_.isUndefined || only.toLowerCase() === 'available') { + if(only.toLowerCase() === 'available') { this.filterOnType[0].updateOptions(); } - if(_.isUndefined || only.toLowerCase() === 'selected') { + if(only.toLowerCase() === 'selected') { this.filterOnType[1].updateOptions(); } }