API15

Difference between revisions of "JAuthorization/acl check"

From Joomla! Documentation

< API15:JAuthorization
(New page: ===Description=== Wraps the actual acl_query() function. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<n...)
 
m (removing red link to edit, no existant pages)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JAuthorization/acl_check|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JAuthorization/acl_check}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 97: Line 97:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JAuthorization/acl_check|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JAuthorization/acl_check}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 112: Line 112:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Revision as of 08:44, 12 May 2013

The "API15" 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]

Wraps the actual acl_query() function.

[<! removed edit link to red link >]

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

Syntax[edit]

acl_check($aco_section_value, $aco_value, $aro_section_value, $aro_value, $axo_section_value=NULL, $axo_value=NULL, $root_aro_group=NULL, $root_axo_group=NULL)
Parameter Name Default Value Description
$aco_section_value The ACO section value
$aco_value The ACO value
$aro_section_value The ARO section value
$aro_value The ARO section
$axo_section_value NULL The AXO section value (optional)
$axo_value NULL The AXO section value (optional)
$root_aro_group NULL The group id of the ARO ??Mike?? (optional)
$root_axo_group NULL The group id of the AXO ??Mike?? (optional)

Returns[edit]

mixed Generally a zero (0) or (1) or the extended return value of the ACL

Defined in[edit]

libraries/joomla/user/authorization.php

Importing[edit]

jimport( 'joomla.user.authorization' );

Source Body[edit]

function acl_check( $aco_section_value, $aco_value, $aro_section_value, $aro_value, $axo_section_value=NULL, $axo_value=NULL, $root_aro_group=NULL, $root_axo_group=NULL )
{
        if ($this->_checkMode === 1) {
                return parent::acl_check( $aco_section_value, $aco_value, $aro_section_value, $aro_value, $axo_section_value, $axo_value, $root_aro_group, $root_axo_group );
        }

        $this->debug_text( "\n<br /> ACO=$aco_section_value:$aco_value, ARO=$aro_section_value:$aro_value, AXO=$axo_section_value|$axo_value" );

        $acl_result = 0;
        for ($i=0; $i < $this->acl_count; $i++)
        {
                $acl =& $this->acl[$i];
                if (strcasecmp( $aco_section_value, $acl[0] ) == 0) {
                        if (strcasecmp( $aco_value, $acl[1] ) == 0) {
                                if (strcasecmp( $aro_section_value, $acl[2] ) == 0) {
                                        if (strcasecmp( $aro_value, $acl[3] ) == 0) {
                                                if ($axo_section_value && $acl[4]) {
                                                        if (strcasecmp( $axo_section_value, $acl[4] ) == 0) {
                                                                if (strcasecmp( $axo_value, $acl[5] ) == 0) {
                                                                        $acl_result = @$acl[6] ? $acl[6] : 1;
                                                                        break;
                                                                }
                                                        }
                                                } else {
                                                        $acl_result = @$acl[6] ? $acl[6] : 1;
                                                        break;
                                                }
                                        }
                                }
                        }
                }
        }
        return $acl_result;
}

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

Examples[edit]

<CodeExamplesForm />