aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/icon.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-14 20:01:59 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-14 20:01:59 +0000
commitb6aaba915151dd07800761a01b67ffffaee1302b (patch)
tree53c30035411460270278943f2427405233b34fac /mod/profile/icon.php
parentffbd7cd4179a0186dc674c2d24f578660cc75df0 (diff)
downloadelgg-b6aaba915151dd07800761a01b67ffffaee1302b.tar.gz
elgg-b6aaba915151dd07800761a01b67ffffaee1302b.tar.bz2
merge -r5898:5928 (not excluding riverdashboard, notifications, and messageboard) from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6058 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/icon.php')
-rw-r--r--mod/profile/icon.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/mod/profile/icon.php b/mod/profile/icon.php
index 463eb3db5..da7667c8b 100644
--- a/mod/profile/icon.php
+++ b/mod/profile/icon.php
@@ -20,6 +20,13 @@ $size = strtolower(get_input('size'));
if (!in_array($size,array('large','medium','small','tiny','master','topbar')))
$size = "medium";
+// If user doesn't exist, return default icon
+if (!$user) {
+ $path = elgg_view("icon/user/default/$size");
+ header("Location: $path");
+ exit;
+}
+
// Try and get the icon
$filehandler = new ElggFile();
$filehandler->owner_guid = $user->getGUID();