Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

save_resource_custom_access()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 4350 to 4360

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 17th September 2024 21:35 Europe/London time based on the source file dated 9th September 2024 13:10 Europe/London time.