API15:JUser/authorize
From Joomla! Documentation
Description
Method to check JUser object authorization against an access control object and optionally an access extension object
Template: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] Template:SeeAlso:JUser/authorize
Examples
<CodeExamplesForm />