U4-11166 Hide disabled users from the users list view

This commit is contained in:
James Coxhead
2018-06-28 19:54:42 +01:00
parent d2500b36d3
commit 0a2fd277a6

View File

@@ -241,6 +241,11 @@ namespace Umbraco.Web.Editors
filterQuery.Where(x => x.Name.Contains(filter) || x.Username.Contains(filter));
}
if (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice)
{
filterQuery.Where(user => !user.IsApproved);
}
long pageIndex = pageNumber - 1;
long total;
var result = Services.UserService.GetAll(pageIndex, pageSize, out total, orderBy, orderDirection, userStates, userGroups, excludeUserGroups, filterQuery);