Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource
$usergroup
$return_default true

Location

include/resource_functions.php lines 3710 to 3721

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=sql_value("select access value from resource_custom_access where resource='" escape_check($resource) . "' and usergroup='$usergroup'",'');
    if(
$result=='' && $return_default)
        {
        return 
$default_customaccess;
        }
    return 
$result;
    }

This article was last updated 28th November 2020 23:05 Europe/London time based on the source file dated 27th November 2020 14:50 Europe/London time.