user_role

Summary

Fetches a list of policies for the specified user

Usage

fetch( 'user', 'user_role',
       hash( 'user_id', user_id ) )

Parameters

NameTypeDescriptionRequired
user_id integer The user to fetch policies from Yes.

Returns

An array with policies

Description

This will return an array with policy structures which define what functionality the user has access to.

The policy structure is an associative array with the following entries.

  • moduleName - The name of the module which the user can access, or * for all modules
  • functionName - The name of the function which the user can access, or * for all functions in the module
  • limitation - The specific elements of module and function which the user can access, or * if all elements are available

Examples

{section var=policy loop=fetch( 'user', 'user_role',

                               hash( 'user_id', 42 ) )}

{$policy.moduleName}, {$policy.functionName}, {$policy.limitation}

{/section}

Comments

Contents

Reference

Database diagram
Template operators
Template functions
Data fetching
    Class
    Content
    Collaboration
    Layout
    Notification
    Package
    Section
    Shop
    URL
    User
       anonymous_count
       current_user
       is_logged_in
       logged_in_count
       logged_in_list
       logged_in_users
       member_of
       user_role
Modules
XML tags


Created

01/06/2004
6:22:37 pm
by Jan Borsodi

Last updated

01/06/2004
6:22:37 pm
by Jan Borsodi

Authors

Jan Borsodi



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.