Actions

API16

JRules/allow

From Joomla! Documentation

< API16:JRules
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Checks that an action can be performed by an identity.

[Edit Descripton]

Description:JRules/allow

Syntax

allow($action, $identity)
Parameter Name Default Value Description
$action The name of the action.
$identity An integer representing the identity, or an array of identities

Returns

mixed

Defined in

libraries/joomla/access/rules.php

Importing

jimport( 'joomla.access.rules' );

Source Body

public function allow($action, $identity)
{
// TODO: Remove debug when finished testing.
//echo "<br>Action: $action, ".print_r($identity, 1);
        // Check we have information about this action.
        if (isset($this->_data[$action])) {
//print_r($this->_data[$action]);
                return $this->_data[$action]->allow($identity);
        }
        return null;
}

[Edit See Also] SeeAlso:JRules/allow

Examples

<CodeExamplesForm />