Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

save_resource_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 3363 to 3373

Definition

 
function save_resource_custom_access($resource)
    {
    
$groups=get_resource_custom_access($resource);
    
sql_query("delete from resource_custom_access where resource='$resource' and usergroup is not null");
    for (
$n=0;$n<count($groups);$n++)
        {
        
$usergroup=$groups[$n]["ref"];
        
$access=getvalescaped("custom_" $usergroup,0);
        
sql_query("insert into resource_custom_access(resource,usergroup,access) values ('$resource','$usergroup','$access')");
        }
    }

This article was last updated 11th July 2020 00:05 Europe/London time based on the source file dated 10th July 2020 16:06 Europe/London time.