Edition note: The comparison operators, wildcards, empty-value matching, dynamic filter values, input values, and multiple filter groups on this page are Pro features. Free accepts only one exact user, id, name, or username selector on the single-user {user} tag.
Comparison Operators PRO
Users Anywhere also allows you to use different comparison operators to filter your users by.
Negative Values
To apply a negative filter that excludes certain users, you can add ! before the value.
So this will show all users that are not in the Manager user group:
{users usergroup="!Manager"}...{/users}
You can also apply a negative filter with multiple values, separating them with a comma:
{users usergroup="!Manager,!Publisher"}...{/users}
If inside an attribute you want one condition to be true, but not the other, make sure you use the && separator between the values, which makes sure both conditions are true at the same time.
For example, the following will show all users that are Managers BUT are NOT Publishers:
{users usergroup="Manager && !Publisher"}...{/users}
Greater or Less than…
You can apply comparison filters on numeric and date values, by prepending the value with <, <=, > or >=.
For example, if you want to show all users that have the nr-of-legs custom field value equal or greater than 2:
{users nr-of-legs=">=2"}...{/users}
Or to show all users that have a lastvisit-date date equal or greater than October 12, 2026:
{users lastvisit-date=">=2026-10-12"}...{/users}
You can also compare dates to the current date using Relative Dates or the now() value.
Wildcards PRO
You can use the * wildcard to match supported user, profile, contact, user-group, access-level, and custom-field filters by part of their value.
The following syntax will return all users that have a name starting with "Peter":
{users name="Peter*"}...{/users}
The following syntax will return all users that have a name containing " van ":
{users name="* van *"}...{/users}
The following syntax will return all users in user groups that have a user group name ending in "Staff":
{users usergroup="*Staff"}...{/users}
Empty Values PRO
Match Empty Values
Leave a filter value empty to match users for whom that supported value is empty or null.
This example returns users without a value in the nr-of-legs custom field:
{users nr-of-legs=""}...{/users}
Match Non-empty Values
Use a plus sign (+) to require any non-empty value. It is different from the * wildcard, which performs text pattern matching.
{users nr-of-legs="+"}...{/users}Dynamic Values PRO
As we seen so far, you can filter users by specific values. However, you can also use dynamic values!
Same Values as Current User
If you want to get all users that have the same value of a certain data as the current logged in user, you can give the current value to your desired filter.
For instance, to get the users that are in the same user group as the current user, you can simply use: usergroup="current". Or to get the contacts living in the same country as the current user, use contact:country="current". Even Custom Fields values are supported (my-custom-field="current").
Vice versa, to exclude the current user from the results, you can add id="!current" to the plugin tag.
Data from the Current User
Prefix a data selector with current: to compare a filter against data from the currently logged-in user.
For example, this matches a custom field against the current user's ID:
{users my-custom-field="current:id"}...{/users}
You can use other supported current-user data in the same way:
{users my-custom-field="current:username"}...{/users}
The special value current is shorthand for the current user's value of the filter being used. For example, usergroup="current" compares user-group membership, while id="!current" excludes the currently logged-in user.
Relative Dates
You can use Relative Dates and Custom Formats inside Filters and If Structures.
This allows to return users that have a dynamic date value of the current day, yesterday, tomorrow, or any other date relative to today. All Relative Dates can also be combined and used with Comparison Operators or Date Ranges.
For example, to return a dynamic list of users that have a call-back date (custom field) of yesterday:
{users call-back-date="date('yesterday')"}...{/users}
To show all users that have a call-back date in the future:
{users call-back-date=">date('today')"}...{/users}
Or using a Date Range to output the users that logged in in the last 30 days:
{users lastvisit-date="date('-30 days') to now()"}...{/users}
Below you find some more examples of the type of values you can use:
now()ordate()ordate('now')=> return current date and time (2026-10-12 21:41:23)
date('today')=> return current date (2026-10-12)
date('tomorrow')=> return date of tomorrow (2026-10-13)
date('yesterday')=> return date of yesterday (2026-10-11)
date('-1 day')=> return date of yesterday with current time (2026-10-11 21:41:23)
date('+2 days')=> return date of 2 days from now with current time (2026-10-14 21:41:23)
date('-1 week')=> return date from 1 week ago with current time (2026-10-05 21:41:23)
date('-1 month')=> return date from 1 month ago with current time (2026-09-12 21:41:23)
date('-1 year')=> return date from 1 year ago with current time (2025-10-12 21:41:23)
See the full list of the possible Relative Date Values that can be used.
For any relative date value, you can also customize the date format it should use. Here are some examples:
date('today', 'l')=> return today's week day name (Monday)date('today', 'F')=> return current month's name (October)date('today', 'Y')=> return current year (2026)
date('tomorrow', 'Y-m-d H:i:s')=> return date of tomorrow with time 00:00:00 (2026-10-13 00:00:00)
date('yesterday', 'Y-m-d H:i:s')=> return date of yesterday with time 00:00:00 (2026-10-11 00:00:00)
date('-1 day', 'Y-m-d')=> return date of yesterday (2026-10-11)
date('+2 days', 'Y-m-d')=> return date of 2 days from now (2026-10-14)
date('-1 week', 'Y-m-d')=> return date from 1 week ago (2026-10-05)
date('-1 month', 'Y-m')=> return last month in Y-m format (2026-09)date('-1 year', 'Y')=> return last year (2025)
The date format characters that you can use are based on the PHP date function.
Note: All Date Filters will be adjusted correctly according to the Time Zone used on your website.
Input Values
Users Anywhere can also dynamically access data from URL params (query strings) and form inputs, thanks to a special "input:.." value.
This allows you to change which users are displayed on your page based on the data sent by a form (both GET and POST form requests are supported), or based on a custom parameter added to the URL.
For example, let's use a custom parameter called myparam (but it can be anything you want):
{users usergroup="input:myparam"}...{/users}
With this plugin code, you could then customize the category from which the users are returned, by simply passing a parameter in the URL like:
https://www.mysite.com/my-users?myparam=Customers
You are also able to set a default value to be used in case the specified parameter is not passed, by adding after the parameter name separated by a colon. For instance, to show users from the user group "Registered" by default, unless overruled via your ?myparam=... parameter:
{users usergroup="input:myparam:Registered"}...{/users}
Note: Be careful to not make it possible for people to show details of your users by simply changing the url parameters. So don't use this when showing email addresses of users by user groups for instance.
Note: If you're using Joomla cache (via Global Configuration, not via the System Plugin), you will need to register these additional URL Parameters as "safe", in order to make Joomla create a unique cache for each page. Users Anywhere allows you to do this in the "Advanced" tab of the plugin settings (for each extra parameter name, you should also specify what type of value it can be).
Multiple Groups PRO
In some cases, you don't want filters to narrow the result down, but to extend it. You can group different filters by separating the groups with ||.
For instance, you might want to show all users from the "Customers" user group, plus all Registered users that have "Lifetime" in the custom "subscription" field.
{users usergroup="Customer" || usergroup="Registered" subscription="Lifetime"}...{/users}
You can use multiple filters per group.
Note that any Filters will be applied to each individual group, so they can be different for each group. However, any Output Settings (like ordering, limit and per-page) will be applied to the whole tag.
So, for example (new lines are just for clarity):
{users
usergroup="Customer"
|| usergroup="Registered" subscription="Lifetime"
|| name="Peter"
limit="10" ordering="name"}
...
{/users}
This tag will return only 10 users in total in alphabetical order, from:
- the users in the "Customer" user group
- the Registered users with a Lifetime subscription
- the users that are called Peter