get_users
{get_users} is used to include your desired users into the array. You have handful of parameters at your disposal.
Usage
It can use following parameters
Parameter Name
Options
assign
Store the result(Array) to this variable
ban
Check user ban status:
yes
no
category
Specific category users. Multiple categories should be separated with comma ‘,’:
Category ID.
count_only
Set to true if you only want to count result:
true
false
date_span
Get users for specific time frame:
all_time
today
yesterday
this_week
last_week
this_month
last_month
this_year
last_year
Get user of provided email:
User Email
exclude
Exclude user from result:
User ID
featured
Get featured users:
yes
no
gender
Get users of specific gender:
female
male
level
Get users of specific level:
Level ID
limit
Number of results you want:
Numercial Figure
order
Sort your result. You also need to tell how to order your result. asc OR desc, e.g ‘username desc’
userid
username
usr_status
ban_status
sex
doj
profile_hits
subscribers
rating
total_videos
total_groups
featured_date
status
Check your user status:
Ok
ToActivate
userid
Get user of provided ID:
User ID
username
Get user of provided username:
Username
Examples
Example 1
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.
[post_link id=”199″] and [post_link id=”237″]
Example 2
This code will get 1 featured user randomly out of all featured users. To display see following code
Last updated