UserGroupManager GetUserList method returns only 50 Results

  • Updated

The UserGroupManager  API has a GetUserList(groupid)  method that returns only 50 results by default. This KB article shows you how to workaround the 50 result limitation. The following example returns only 50 results.

long groupId = 1;
  Ektron.Cms.Framework.User.UserGroupManager ugManager = new Ektron.Cms.Framework.User.UserGroupManager();
  var list = ugManager.GetUserList(groupId);

long groupId = 1;
  Ektron.Cms.Framework.User.UserManager uManager = new Ektron.Cms.Framework.User.UserManager();
  Ektron.Cms.User.UserCriteria uCriteria = new Ektron.Cms.User.UserCriteria();
  uCriteria.AddFilter(Ektron.Cms.User.UserProperty.Id, Ektron.Cms.Common.CriteriaFilterOperator.InSubClause, "select user_id from user_to_group_tbl where usergroup_id = " + groupId);
  uCriteria.PagingInfo = new Ektron.Cms.PagingInfo(10000);
 var usersInGroup = uManager.GetList(uCriteria);