JRule/mergeIdentity

From Joomla! Documentation

Jump to: navigation, search

Contents

Description

Merges the value for an identity.

Syntax

JRule::mergeIdentity($identity, $allow)
Parameter Name Default Value Description
$identity The identity.
$allow The value for the identity (true == allow, false == deny).

Defined in

libraries/joomla/access/rule.php

Importing

jimport( 'joomla.access.rule' );

Source Body

        public function mergeIdentity($identity, $allow)
        {
                $identity       = (int) $identity;
                $allow          = (int) ((boolean) $allow);
 
                // Check that the identity exists.
                if (isset($this->_data[$identity]))
                {
                        // Explicit deny always wins a merge.
                        if ($this->_data[$identity] !== 0) {
                                $this->_data[$identity] = $allow;
                        }
                }
                else {
                        $this->_data[$identity] = $allow;
                }
        }
Personal tools