Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_resource_custom_access_users_usergroups()

Parameters

ColumnTypeDefaultDescription
$resource

Location

include/resource_functions.php lines 3872 to 3886

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 September 2022 00:05 Europe/London time based on the source file dated 22nd September 2022 10:25 Europe/London time.