function user_file_download

cis7 user.module user_file_download($uri)
cle7 user.module user_file_download($uri)
elmsmedia7 user.module user_file_download($uri)
icor7 user.module user_file_download($uri)
meedjum_blog7 user.module user_file_download($uri)
mooc7 user.module user_file_download($uri)

Implements hook_file_download().

Ensure that user pictures (avatars) are always downloadable.

File

modules/user/user.module, line 880
Enables the user registration and login system.

Code

function user_file_download($uri) {
  if (strpos(file_uri_target($uri), variable_get('user_picture_path', 'pictures') . '/picture-') === 0) {
    $info = image_get_info($uri);
    return array('Content-Type' => $info['mime_type']);
  }
}