1 file.module | file_query_file_access_alter(QueryAlterableInterface $query) |
Implements hook_query_TAG_alter().
This is the hook_query_alter() for queries tagged with 'file_access'. It adds file access checks for the user account given by the 'account' meta-data (or global $user if not provided).
Related topics
File
- core/
modules/ file/ file.module, line 2926 - Defines a "managed_file" Form API field and a "file" field for Field module.
Code
function file_query_file_access_alter(QueryAlterableInterface $query) {
_file_query_file_access_alter($query, 'file');
}