From 7a163a886170aa436807f24590dd6c48503ed970 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 9 Jul 2011 12:06:05 -0400 Subject: fixed redirect for user avatars if we cannot get the user --- pages/avatar/view.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pages/avatar') diff --git a/pages/avatar/view.php b/pages/avatar/view.php index 55ae00e16..eb2cd1010 100644 --- a/pages/avatar/view.php +++ b/pages/avatar/view.php @@ -13,9 +13,9 @@ if (!in_array($size, array('master', 'large', 'medium', 'small', 'tiny', 'topbar // If user doesn't exist, return default icon if (!$user) { - $path = elgg_view("icon/user/default/$size"); - header("Location: $path"); - exit; + $url = "_graphics/icons/user/default{$size}"; + $url = elgg_normalize_url($url); + forward($url); } // Try and get the icon @@ -31,9 +31,9 @@ if ($filehandler->open("read")) { } if (!$success) { - $path = elgg_view('icon/user/default/'.$size); - header("Location: {$path}"); - exit; + $url = "_graphics/icons/user/default{$size}"; + $url = elgg_normalize_url($url); + forward($url); } header("Content-type: image/jpeg"); -- cgit v1.2.3