diff options
Diffstat (limited to 'mod/profile/start.php')
| -rw-r--r-- | mod/profile/start.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php index 0f13ad844..ab596f235 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -48,6 +48,7 @@ function profile_init() { * Profile page handler * * @param array $page Array of URL segments passed by the page handling mechanism + * @return bool */ function profile_page_handler($page) { @@ -55,6 +56,8 @@ function profile_page_handler($page) { $username = $page[0]; $user = get_user_by_username($username); elgg_set_page_owner_guid($user->guid); + } elseif (elgg_is_logged_in()) { + forward(elgg_get_logged_in_user_entity()->getURL()); } // short circuit if invalid or banned username @@ -72,7 +75,7 @@ function profile_page_handler($page) { // use the core profile edit page $base_dir = elgg_get_root_path(); require "{$base_dir}pages/profile/edit.php"; - return; + return true; } // main profile page @@ -83,7 +86,8 @@ function profile_page_handler($page) { $content = elgg_view_layout('widgets', $params); $body = elgg_view_layout('one_column', array('content' => $content)); - echo elgg_view_page($title, $body); + echo elgg_view_page($user->name, $body); + return true; } /** |
