# get\_users

{get\_users} is used to include your desired users into the array. You have handful of parameters at your disposal.

**Usage**

```
{get_users parameters}
```

It can use following parameters

| Parameter Name | **Options**                                                                                                                                                                                                                                                                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| assign         | Store the result(Array) to this variable                                                                                                                                                                                                                                                                                                       |
| ban            | <p>Check user ban status:</p><ul><li>yes</li><li>no</li></ul>                                                                                                                                                                                                                                                                                  |
| category       | <p>Specific category users. Multiple categories should be separated with comma ‘,’:</p><ul><li>Category ID.</li></ul>                                                                                                                                                                                                                          |
| count\_only    | <p>Set to true if you only want to count result:</p><ul><li>true</li><li>false</li></ul>                                                                                                                                                                                                                                                       |
| date\_span     | <p>Get users for specific time frame:</p><ul><li>all\_time</li><li>today</li><li>yesterday</li><li>this\_week</li><li>last\_week</li><li>this\_month</li><li>last\_month</li><li>this\_year</li><li>last\_year</li></ul>                                                                                                                       |
| email          | <p>Get user of provided email:</p><ul><li>User Email</li></ul>                                                                                                                                                                                                                                                                                 |
| exclude        | <p>Exclude user from result:</p><ul><li>User ID</li></ul>                                                                                                                                                                                                                                                                                      |
| featured       | <p>Get featured users:</p><ul><li>yes</li><li>no</li></ul>                                                                                                                                                                                                                                                                                     |
| gender         | <p>Get users of specific gender:</p><ul><li>female</li><li>male</li></ul>                                                                                                                                                                                                                                                                      |
| level          | <p>Get users of specific level:</p><ul><li>Level ID</li></ul>                                                                                                                                                                                                                                                                                  |
| limit          | <p>Number of results you want:</p><ul><li>Numercial Figure</li></ul>                                                                                                                                                                                                                                                                           |
| order          | <p>Sort your result. You also need to tell how to order your result. asc OR desc, e.g ‘username desc’</p><ul><li>userid</li><li>username</li><li>usr\_status</li><li>ban\_status</li><li>sex</li><li>doj</li><li>profile\_hits</li><li>subscribers</li><li>rating</li><li>total\_videos</li><li>total\_groups</li><li>featured\_date</li></ul> |
|                |                                                                                                                                                                                                                                                                                                                                                |
| status         | <p>Check your user status:</p><ul><li>Ok</li><li>ToActivate</li></ul>                                                                                                                                                                                                                                                                          |
| userid         | <p>Get user of provided ID:</p><ul><li>User ID</li></ul>                                                                                                                                                                                                                                                                                       |
| username       | <p>Get user of provided username:</p><ul><li>Username</li></ul>                                                                                                                                                                                                                                                                                |

#### Examples

**Example 1**

```
{get_users assign=month_users date_span="this_month " status="Ok" order=" doj asc"}
```

Above code will get users of current month but only those with status of “Ok” and order according to their date-of-joined from oldest to latest. Function returned an array which is stored in {$month\_users} variable. Time to loop through array and display our users.

```
{section name=mon_urs from=$month_users}
	{include file="$style_dir/blocks/user.html" user=$month_users[mon_usrs]}
{/section}
```

\[post\_link id=”199″] and \[post\_link id=”237″]

**Example 2**

```
{get_users assign=featured_user limit=1 featured="yes" order=RAND()}
```

This code will get 1 featured user randomly out of all featured users. To display see following code

```
{section name=feat_user from=$featured_user}
	{include file="$style_dir/blocks/user.html" user=$featured_user[feat_user]}
{/section}
```

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clipbucket.com/guides/functions/get_users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
