From 0d2b7fe81b37ce2ccddca0d6bbd1aa276d20d82e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 20 Oct 2009 00:55:30 +0000 Subject: - Patch #443200 by c960657: fixed user pictures not working with private files. --- modules/user/user.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 424916ef4..5e4f60ade 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -747,9 +747,9 @@ function user_permission() { * * Ensure that user pictures (avatars) are always downloadable. */ -function user_file_download($filepath) { - if (strpos(file_uri_target($filepath), variable_get('user_picture_path', 'pictures') . '/picture-') === 0) { - $info = image_get_info($filepath); +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']); } } -- cgit v1.2.3