Actions

API16

JRule/mergeIdentity

< API16:JRule

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Merges the value for an identity.



Syntax

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;
        }
}



Examples

Code Examples


Advertisement