Member categories

The obvious limitation of ExpressioEngine membership system is that a member can be part of only one membership group. With Member categories, you can assign multiple categories to your members. Categories used are the channel categories, so you can easily relate "groups" of members to "groups" of entries.

Features:

Settings

Before using Member categories, you should select in module settings what category groups you want to be applicable for members. You can also optionally choose to automatically assign parent category for member, if the child category is assigned.

Note that if you're using MSM you'll have to provide settings for each site separately.

Display members belonging to category

{exp:member_categories:members category_id="1"}

Example: Members in this category
{exp:member_categories:members category_url_title="{segment_3}" backspace="1"}
<a href="{path=profile/{username}}">{screen_name}</a>,
{if no_results}none{/if}
{paginate}{pagination_links}{/paginate}
{/exp:member_categories:members}

Parameters:

You MUST provide either category_id OR category_url_title

Variables (all having the same meaning that in member profile tag):

Display categories assigned to member

{exp:member_categories:categories member_id="1"}

Example: This member belongs to categories:
{exp:member_categories:categories username="{segment_3}" backspace="1"}
<a href="{path=category/{category_url_title}}">{category_name}</a>,
{if no_results}none{/if}
{/exp:member_categories:categories}

Parameters:

Variables (all having the same meaning that in channel categories tag):

Check whether a member belongs to certain category

{exp:member_categories:check member_id="1" category_url_title="{segment_3}"}

Example: {exp:member_categories:check username="{segment_3}" category_id="1"}
The member belongs to the category
{if no_results}The member does NOT belong to the category{/if}
{/exp:member_categories:check}

Parameters:

You MUST provide category_id (or category_url_title)

You can also pass multiple category IDs to check whether member belong to at least one category. Use pipe (|) separator for category_id parameter. E.g. category_id="1|7|12"

The contents of tag pair will be returned if there is a match between member and category. Otherwise the contents of {if no_results} block will be returned. No additional variables are available.

Display entries from member's category

To display entries from the same category that member belongs to, you can use combination of {exp:member_categories:categories} and {exp:channel:entries} tags.

{exp:member_categories:categories username="{segment_3}"}
Category: {category_name}, entries:
{exp:channel:entries category="{category_id}" dynamic="no" backspace="1"} <a href="{path=view/{url_title}}">{title}</a<,
{if no_results}none{/if}
{/exp:channel:entries}
{if no_results}none{/if}
{/exp:member_categories:categories}

Assign categories on backend and frontend

From the module control panel, you can assign any number of categories to member by checking the appropriate checkboxes. Just like you do with categories for entries.

Note that if you're using MSM only category groups for current site are displayed (and only those defined in settings).

If you have Member categories module installed, you can use SA Member Edit to enable users editing their categories on the frontend.

To assign categories from the front-end, place {exp:member_categories:form} tag pair somewhere in your templates. The tag pair has only one variable — {categories}, which return pre-formatted list of categories checkboxes. If you want to edit the way categories are displayed, you need to edit categories_edit.php file in views folder.

You can also edit categories using Stand-Alone Member Edit module

My categories:
{exp:member_categories:form}
{categories}
<input type="submit" value="Save" />
{/exp:member_categories:form}

Top of page