Last updated: Wed, Jan 4, 2023 3:19 pm
Return to Knowledgebase
First Introduced | v2.5.0 |
# | Parameter | Data Type | Required | Description |
---|---|---|---|---|
1 | $orderBy = null | string | No | Comma separated params of order by clause to send to the database |
2 | $desc = false | bool | No | An optional value to order the orderBy in a descending fashion |
3 | $disabled = true | bool | No | Pass false to remove disabled users from the return |
Data Type | Description of Returned Data |
---|---|
array of objects | Returns data from the users table based on the specific parameters. |
$orderBy = \'lname DESC, fname\'; //orders by lname desc, fname
$desc = true; //forces last orderBy param to be desc as well, if no order by is passed, this doesnt do anything
$disabled = false; //removes users who are disabled, DB column permissions
// All the below parameters are optional - remove them all to fetch all users
$users = fetchAllUsers($orderBy, $desc, $disabled);
foreach($users as $u) {
dump($u);
}