Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_users()

Description

Returns a user list. Group or search term is optional. The standard user group names are translated using $lang. Custom user group names are i18n translated.

If blank, zero or NULL then all users will be returned irrespective of their group

Parameters

ColumnTypeDefaultDescription
$group integer 0 Can be a single group, or a comma separated list of groups used to limit the results
$find string "" Search string to filter returned results
$order_by string "u.username"
$usepermissions boolean false
$fetchrows integer -1
$approvalstate string ""
$returnsql boolean false Return prepared statement object containing sql query and parameters.
$selectcolumns string ""
$exact_username_match boolean false Denotes $find must be an exact username

Return

array|object Matching user records Returns an array of user information or prepared statement object containing sql query and parameters.

This article was last updated 14th December 2024 20:35 Europe/London time based on the source file dated 12th December 2024 10:30 Europe/London time.