Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource
$usergroup
$return_default true

Location

include/resource_functions.php lines 4142 to 4160

Definition

 
function get_custom_access($resource,$usergroup,$return_default=true)
    {
    global 
$custom_access,$default_customaccess;
    if (
$custom_access==false) {return false;} # Custom access disabled

    
$result=ps_value("select access value from resource_custom_access where resource=? and usergroup=?",array("i",$resource,"i",$usergroup),'');
    if(
$result=='')
        {
        if(
$return_default)
            {
            
$result=$default_customaccess;
            }
        else
            {
            
$result=false;
            }
        }
    return 
$result;
    }

This article was last updated 4th February 2023 12:35 Europe/London time based on the source file dated 3rd February 2023 13:55 Europe/London time.