Skip to the content
Documentation

user_roles

No ratings yet

Summary

Fetches users and/or user groups with role limitations related to a certain section.

Usage

fetch( 'section', 'user_roles', hash( 'section_id', section_id ) )

Parameters

Name Type Description Required
section_id integer The ID number of the target section. Yes.

Returns

An array (see below) or FALSE.

Description

This function fetches user and/or user groups that have role limitations associated with a certain section. The section must be defined using a valid section ID number through the "section_id" parameter. Please refer to the example below to see how the returned information can be used.

Examples

Example 1

{def $user_roles=fetch( 'section', 'user_roles', hash( 'section_id', 13 ) )}

{foreach $user_roles as $user_role}
    User (or group) {$user_role.user.name} has limitation on the section 13.
    The "touched" role is {$user_role.role.name}. <br />
{/foreach}

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.