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

save_resource_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 3698 to 3708

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 30th November 2020 11:35 Europe/London time based on the source file dated 27th November 2020 14:50 Europe/London time.