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

get_resource_custom_access_users_usergroups()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 4322 to 4336

Definition

 
function get_resource_custom_access_users_usergroups($resource)
    {
    
# Returns only matching custom_access rows, with users and groups expanded
    
return ps_query("
                 SELECT g.name usergroup,
                        u.username user,
                        c.access,
                        c.user_expires AS expires
                   FROM resource_custom_access AS c
        LEFT OUTER JOIN usergroup AS g ON g.ref = c.usergroup
        LEFT OUTER JOIN user AS u ON u.ref = c.user
                  WHERE c.resource = ?
               ORDER BY g.name, u.username
    "
, ['i'$resource]);
    }

This article was last updated 25th April 2024 18:35 Europe/London time based on the source file dated 25th April 2024 17:25 Europe/London time.