aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-07-09 12:06:05 -0400
committercash <cash.costello@gmail.com>2011-07-09 12:06:05 -0400
commit7a163a886170aa436807f24590dd6c48503ed970 (patch)
tree05318c769ba831709097e675e8923d3b4100690b /engine/lib
parentc16bdb97aac98799b2de39e97696a684f5c50a21 (diff)
downloadelgg-7a163a886170aa436807f24590dd6c48503ed970.tar.gz
elgg-7a163a886170aa436807f24590dd6c48503ed970.tar.bz2
fixed redirect for user avatars if we cannot get the user
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/users.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index e7e1a57f0..48f10f974 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1383,7 +1383,10 @@ function elgg_profile_fields_setup() {
function elgg_avatar_page_handler($page) {
global $CONFIG;
- set_input('username', $page[1]);
+ $user = get_user_by_username($page[1]);
+ if ($user) {
+ elgg_set_page_owner_guid($user->getGUID());
+ }
if ($page[0] == 'edit') {
require_once("{$CONFIG->path}pages/avatar/edit.php");