function user_file_download_access

Implements hook_file_download_access().

File

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

Code

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