Actions

API15

JUser/authorize

From Joomla! Documentation

< API15:JUser
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

Method to check JUser object authorization against an access control object and optionally an access extension object

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

authorize($acoSection, $aco, $axoSection=null, $axo=null)
Parameter Name Default Value Description
$acoSection $acoSection The ACO section value
$aco $aco The ACO value
$axoSection null $axoSection The AXO section value [optional]
$axo null $axo The AXO value [optional]

Returns

boolean True if authorized

Defined in

libraries/joomla/user/user.php

Importing

jimport( 'joomla.user.user' );

Source Body

function authorize( $acoSection, $aco, $axoSection = null, $axo = null )
{
        // the native calls (Check Mode 1) work on the user id, not the user type
        $acl    = & JFactory::getACL();
        $value  = $acl->getCheckMode() == 1 ? $this->id : $this->usertype;
 
        return $acl->acl_check( $acoSection, $aco,      'users', $value, $axoSection, $axo );
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />