CartThrob 10 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Permissions

Outputs permission records assigned to members.

This tag is provided by the bundled Permissions Manager add-on (cartthrob_permissions_manager).

Parameters
id

Permission record ID(s), pipe-delimited.

id="123|124"
member_id

Member ID filter. Supports CURRENT_USER, {member_id}, and {logged_in_member_id}.

If omitted, the current logged-in member is used. CURRENT_USER, {member_id}, and {logged_in_member_id} always resolve to the current member.

An ExpressionEngine Super Admin can supply another member ID. ExpressionEngine checks all assigned roles when identifying a Super Admin. For other members, an explicit ID is restricted to the current logged-in member.

order_id

Order ID filter, pipe-delimited.

item_id

Item ID filter, pipe-delimited.

permission

Permission ID/code filter, pipe-delimited.

limit

Maximum rows. Defaults to 100.

order_by

Sort field. Defaults to id.

sort

Sort direction when order_by is set. Defaults to desc.

sub_id

Subscription ID filter, pipe-delimited.

The tag returns assignments linked to the requested Subscription only when that Subscription is Open or its end date is still in the future. An expired Subscription does not return permission assignments through this filter.

Variables
  • id
  • permission
  • member_id
  • sub_id
  • item_id
  • order_id
Conditionals

{if no_results}

Rendered when no records match.

Example
{exp:cartthrob:permissions limit="10" member_id="CURRENT_USER" order_by="id" sort="desc"}
    {id}
    {member_id}
    {sub_id}
    {item_id}
    {order_id}

    {if no_results}
        <p>No permissions found.</p>
    {/if}
{/exp:cartthrob:permissions}