Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

collection_min_access()

Description

Returns the minimum access (the least permissive) that the current user has to the resources in $collection.

Parameters

ColumnTypeDefaultDescription
$collection integer

Return

integer

Location

include/collections_functions.php lines 2489 to 2511

Definition

 
function collection_min_access($collection)
    {
    
$minaccess 0;
    if(
is_array($collection))
        {
        
$result $collection;
        }
    else
        {
        
$result do_search("!collection{$collection}"'''relevance'0, -1'desc'false''false'');
        }

    for(
$n 0$n count($result); $n++)
        {
        
$access get_resource_access($result[$n]);
        if(
$access $minaccess)
            {
            
$minaccess $access;
            }
        }

    return 
$minaccess;
    }

This article was last updated 14th July 2020 05:05 Europe/London time based on the source file dated 9th July 2020 17:22 Europe/London time.