Collections functions
General functions
Render functions
Theme permission functions
Resource functions

save_resource_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 3903 to 3913

Definition

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

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