* 'email': 'username@example.org'
* 'isRestoreDisabled':false
* }
- * @param sort
- * @returns table row created for this user
*/
- add: function (user, sort) {
+ add: function (user) {
if (this.currentGid && this.currentGid !== '_everyone' && _.indexOf(user.groups, this.currentGid) < 0) {
return;
}
UserList.checkUsersToLoad();
}
- /**
- * sort list
- */
- if (sort) {
- UserList.doSort();
- }
-
$quotaSelect.on('change', UserList.onQuotaSelect);
// defer init so the user first sees the list appear more quickly
window.setTimeout(function(){
$quotaSelect.singleSelect();
}, 0);
- return $tr;
},
// From http://my.opera.com/GreyWyvern/blog/show.dml/1671288
alphanum: function(a, b) {
OC.generateUrl('/settings/users/users'),
{ offset: UserList.offset, limit: limit, gid: gid, pattern: pattern },
function (result) {
- var loadedUsers = 0;
- var trs = [];
//The offset does not mirror the amount of users available,
//because it is backend-dependent. For correct retrieval,
//always the limit(requested amount of users) needs to be added.
if(UserList.has(user.name)) {
return true;
}
- var $tr = UserList.add(user, false);
- trs.push($tr);
- loadedUsers++;
+ UserList.add(user);
});
if (result.length > 0) {
UserList.doSort();
}
}
if(!UserList.has(username)) {
- UserList.add(result, true);
+ UserList.add(result);
+ UserList.doSort();
}
$('#newusername').focus();
GroupList.incEveryoneCount();