API16

JUser/authorise

From Joomla! Documentation

< API16:JUser
Revision as of 21:15, 24 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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[edit]

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



Syntax[edit]

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[edit]

boolean True if authorised

Defined in[edit]

libraries/joomla/user/user.php

Importing[edit]

jimport( 'joomla.user.user' );

Source Body[edit]

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



Examples[edit]

Code Examples[edit]