This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

User Search extends the Database Item List. Click here to read more about the database item list class.

Instantiating the UserList object

	Loader::model('user_list'); 	$ul = new UserList();

Methods Available

$ul->filterByUserName($username)

Filters a list by username.

$ul->filterByKeywords($keywords)

Filters a list by keywords, which searches

  1. Username
  2. Email
  3. Any user attributes marked as being included in the search index.

$ul->filterByGroup($groupName)

Filters by Group name.

$ul->filterByGroupID($groupID)

Only shows users in a particular group (by ID.)

$ul->filterByDateAdded($date, $comparison = '=')

Filters by date. Allows all MySQL comparison symbols (greather than, less than, etc...)

$ul->filterByIsActive($active)

Filters by $active users (1 or 0.)

$ul->filterByAttribute($attributeKeyHandle, $value, $comparison = '=')

Filters by a user attribute key handle. Additionally, the UserList class has a magic method which will allow all user attribute key sorting based on handle

	$ul->filterByDateOfBirth('1979-07-11', '='); 	$ul->filterByGender('male');

$users = $ul->get($itemsToGet = 100, $offset = 0)

Gets all users who fit the criteria.

$users->getPage($page = false)

Gets a page of users (taking into account $itemsPerPage, current page, etc...)

Loading Conversation