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 3915 to 3926

Definition

 
function get_custom_access($resource,$usergroup,$return_default=true)
    {
    global 
$custom_access,$default_customaccess;
    if (
$custom_access==false) {return 0;} # Custom access disabled? Always return 'open' access for resources marked as custom.

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

This article was last updated 5th October 2022 04:05 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.