diff options
Diffstat (limited to 'mod/profile/start.php')
-rw-r--r-- | mod/profile/start.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php index adac92aef..80f923cb3 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -121,18 +121,18 @@ function profile_fields_setup() { function profile_page_handler($page) { global $CONFIG; - $username = $action = NULL; + $action = NULL; // short circuit if invalid or banned username if (isset($page[0])) { $username = $page[0]; $user = get_user_by_username($username); + set_input('username', $page[0]); + } - if (!$user || ($user->isBanned() && !isadminloggedin())) { - return elgg_echo('profile:notfound'); - } else { - set_input('username', $page[0]); - } + if (!$user || ($user->isBanned() && !isadminloggedin())) { + register_error(elgg_echo('profile:notfound')); + forward(); } if (isset($page[1])) { |