Actions

API15

JUser/authorize

From Joomla! Documentation

< API15:JUser
Revision as of 17:17, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Description

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

[Edit Descripton]

Description:JUser/authorize

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

[Edit See Also] SeeAlso:JUser/authorize

Examples

<CodeExamplesForm />