We make tools that make websites.

Recommendations

User

User brings EE member template functionality outside of those restricted templates, and brings with it a robust set of front end member management tools.


More Info Add to Cart


.

Facebook Connect

Adds Facebook single sign-on capability to your EE site, as well as the ability to publish data from EE to one's Facebook profile.


More Info Add to Cart


.

My Cart

Documentation

User:Users (Member List)

The User:Users function allows you to display a list of all your members. It's basically a Member List. For further flexibility, you can filter down your results by almost any method.

{exp:user:users} content {/exp:user:users} 

Parameters

Most usual parameters are available here. Additionally, these exist as well:

alpha=

alpha="a" 

The 'alpha' parameter allows you to filter down your results to users whose screen names begin with the specified letter(s).

category=

category="56" 

The 'category' parameter allows you to specify a Category a user has been assigned to. The User:Users function also has dynamic recognition of a category ID or url_title specified in the URL.

custom_member_field= (deprecated)

custom_member_field="firstname|mike" 

The 'custom_member_field' parameter allows you to filter down your results to a list of users by specifying a custom field and a value for it. Also see filter_method parameter.

dynamic=

dynamic="off" 

The 'dynamic' parameter is available to stop the loop from looking into the URI for an ID of any type.

dynamic_parameters=

dynamic_parameters="yes" 

The 'dynamic_parameters' parameter allows for dynamic sorting of your users list. Used in conjunction with user_orderby and user_sort.

filter_method= (deprecated)

filter_method="exact" 

The 'filter_method' parameter is for further flexibility with the screen_name, custom_member_field, standard_member_field parameters. Based on the values for the other parameter(s), it allows you to filter by 'exact' match or 'any' match. 'Exact' means that someone's screen name has to be screen_name="joe". 'Any' means screen names like "joe" so that "scubajoe" would match.

group_id=

group_id="6|7|12" 

The 'group_id' parameter allows you to filter your user list results by member group(s). Additionally, you can use "not" to exclude member groups you'd like to not show ("not 4|7").

limit=

limit="15" 

The 'limit' parameter controls how many results will be outputted. The limit will default to 100 entries if a value is not specified.

member_id=

member_id="not 12|65|109" 

The 'member_id' parameter allows you to filter out or display only specific members by specifying their member ID(s). You can hardcode a member ID, pass it through an embed, or grab it from the URI. Specify not to exclude specific members from displaying in the results. Seperate multiple member ID's with the pipe character.

orderby=

orderby="username|screen_name" 

The 'orderby' parameter gives you the ability to control the order in which your users are ordered in the list. This parameter can accept multiple values separated by pipe. When multiples are provided, the sort parameter should match up with pipes. You can order by any variable that you can parse on as well as 'random'.

offset=

offset="2" 

The 'offset' parameter will skip the first specified amount of users in the list. For example, if you specify "2", it will not show the first 2 users in the list.

paginate=

paginate="both" 

The 'paginate' parameter allows you to control where the pagination will display. Options are top, bottom, or both. Used in conjunction with the user_paginate variable pair.

screen_name= (deprecated)

screen_name="joe" 

The 'screen_name' parameter allows you to filter down your results to a list of users that match the specified screen name. Also see filter_method parameter.

search:member_field=

search:location="cal%" 

This parameter works similar to the EE search:field= parameter and allows you to search your standard and custom member fields for specific values to filter down your member results. Additionally, you can search on Screen Name and Usernames as well. % can be used as a wildcard, && can be used for inclusive (contains both/all values) searching, and the pipe character can be used to specify multiple values. Examples:

  • search:your_field_name="IS_EMPTY" - members that have that field empty
  • search:your_field_name="IS_NOT_EMPTY" - members that have a value for that field
  • search:your_field_name="value" - members that contain the specified value for that field
  • search:your_field_name="value|value2" - members that contain EITHER of the specified values for that field
  • search:your_field_name="value&&value2" - members that contain BOTH of the specified values for that field
  • search:your_field_name="%value%" - members that contain the specified value within words for that field (ex: %pp% would match apple, happy, etc)
  • search:your_field_name="%value" - members that contain the specified value within words for that field (ex: %nut% would match peanut, chestnut, etc)
  • search:your_field_name="value%" - members that contain the specified value within words for that field (ex: %pan% would match pants, pans, etc)
  • search:your_field_name="not value" - members that DO NOT contain the specified value for that field
  • search:your_field_name="not value|value2" - members that DO NOT contain EITHER of the specified values for that field
  • search:your_field_name="not value&&value2" - members that DO NOT contain BOTH of the specified values for that field
  • search:your_field_name="not %value%" - members that DO NOT contain the specified value within words for that field (ex: %pp% would exclude apple, happy, etc)
  • search:your_field_name="not value|%value2%" - members that DO NOT contain a direct word match on the first value, or DO NOT contain the second value within any words in that field
  • search:your_field_name="not value&&%value2%" - members that DO NOT contain a direct word match on the first value, AND DO NOT contain the second value within any words in that field

sort=

sort="asc|desc" 

You can sort by 'asc' or 'desc'. When multiples are provided in the orderby, this parameter should match up with pipes.

standard_member_field= (deprecated)

standard_member_field="username|mike" 

The 'standard_member_field' parameter allows you to filter down your results to a list of users by specifying a standard member field and a value for it. Also see filter_method parameter.

Variables

All User and Member variables are available here. Additionally, these exist as well:

count

{count} 

The 'count' variable outputs the display order number for each user in the list results.

abbr_

{abbr_your_custom_field} 

By prepending 'abbr_' to any custom member field, it returns a one letter abbreviation of the field value.

switch

{switch="style1|style2"

The 'switch' variable allows you to switch a CSS class back and fourth for all outputed results.

total_combined_posts

{total_combined_posts} 

The 'total_combined_posts' variable shows the total combined posts for a given user.

total_results

{total_results} 

The 'total_results' variable outputs the total number of results for that page.

absolute_count

{absolute_count} 

This variable will return the absolute position number of the search term within the list of results, including paginated results.

absolute_results

{absolute_results} 

This variable will return the absolute total amount of search term results being displayed in the results, including paginated results. You would typically use this in a conditional statement.

Variable Pairs

The following variable pairs are available for use:

user_paginate

{user_paginate}
Page {user_current_page} of {user_total_pages} pages 
&nbsp{user_pagination_links}
{
/user_paginate} 

Pagination is available for this tag and works just like regular EE pagination, but each variable/variable pair is prepended with user_ (except for any variables/variable pairs inside of the user_pagination_links variable pair in EE 2.3+). Used in conjunction with the paginate parameter.

Conditionals

The variables above are available as conditionals. Additionally these exist as well:

if user_no_results

{if user_no_results}Sorryno results were found.{/if} 

The 'if user_no_results' conditional evaluates to true and displays it's contents when there are no results found for this tag.

Form Fields

The following form fields are available for use:

user_orderby

<select name="user_orderby"><br />
<
option value="username">Username</option><br />
<
option value="screen_name">Screen Name</option><br />
<
option value="join_date">Join Date</option><br />
</
select

You can send 'orderby' parameters through form submission using the POST method. The name of the field sent through post needs to be user_orderby. This is the same as 'orderby' and corresponds to user_sort. This only works when - dynamic_parameters is set to 'yes'. Also note that the order and sort values are saved to cookies so that the preference is remembered during pagination.

user_sort

<select name="user_sort"><br />
<
option value="asc">Ascending</option><br />
<
option value="desc">Descending</option><br />
</
select

You can send 'sort' parameters through form submission using the POST method. The name of the field sent through post needs to be user_sort. This is the same as 'sort' and corresponds to user_orderby. This only works when - dynamic_parameters is set to 'yes'. Also note that the order and sort values are saved to cookies so that the preference is remembered during pagination.

Examples

The following code will generate a very simple list of all site members with a link to their profiles (assuming your profile template is located at “users/profile”), along with pagination:

<ul>
{exp:user:users
   orderby
="screen_name"
   
sort="asc"
   
limit="25"
   
paginate="both"
}
   
<li><a href="{path=users/profile}{member_id}">{screen_name}</a></li>
   
{if user_no_results}
      
<li>Sorryno results were found.</li>
   
{/if} 
   {user_paginate}
      
<li>Page {user_current_page} of {user_total_pages} pages  {user_pagination_links}</li>
   
{/user_paginate}
{
/exp:user:users}
</ul

The below example with generate a memberlist sorted by Total Entries by default. Above the list, is a form to Dynamically sort the list.

<form method="post" action="{path="user/users"}">
 
<
select name="user_orderby">
<
option value="username">Username</option>
<
option value="screen_name">Screen Name</option>
<
option value="join_date">Join Date</option>
</
select>
 
<
select name="user_sort">
<
option value="asc">Ascending</option>
<
option value="desc">Descending</option>
</
select>
 
<
input type="submit" value="Sort" />
 
</
form>
 
{exp:user:users orderby="total_entries" sort="desc" dynamic_parameters="yes"}
 
<p>Screen Name{screen_name}</p>
<
p>Total Entries{total_entries}</p>
<
p>Join Date{join_date  format="%m %d, %Y"}</p>
<
p>Email{email}</p>
<
br /><br />
 
{/exp:user:users}