function user_file_download_access

Implements hook_file_download_access().

File

drupal/core/modules/user/user.module, line 2992
Enables the user registration and login system.

Code

function user_file_download_access($field, EntityInterface $entity, File $file) {
  if ($entity
    ->entityType() == 'user') {
    return user_view_access($entity);
  }
}