Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

save_resource_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 4270 to 4280

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 19th March 2024 04:35 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.