API16

API16:JUser/authorise

From Joomla! Documentation

Description

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



Syntax

authorise($action, $assetname=null)
Parameter Name Default Value Description
$action The name of the action to check for permission.
$assetname null The name of the asset on which to perform the action.

Returns

boolean True if authorised

Defined in

libraries/joomla/user/user.php

Importing

jimport( 'joomla.user.user' );

Source Body

public function authorise($action, $assetname = null)
{
        return JAccess::check($this->id, $action, $assetname);
}



Examples

Code Examples