Back to PhocaGalleryAccess class

Method getCategoryAccess

public static
getCategoryAccess
(mixed $id)

Method getCategoryAccess - Source code

/*
 * Get info about access in only one category
 */
public static function getCategoryAccess($id)
{
    $output = array();
    $db = Factory::getDBO();
    $query = 'SELECT c.access, c.accessuserid, c.uploaduserid, c.deleteuserid, c.userfolder' . ' FROM #__phocagallery_categories AS c' . ' WHERE c.id = ' . (int) $id . ' ORDER BY c.id';
    $db->setQuery($query, 0, 1);
    $output = $db->loadObject();
    return $output;
}