diff options
Diffstat (limited to 'engine/lib/user_settings.php')
-rw-r--r-- | engine/lib/user_settings.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index bb5d8d6c4..1e2d6db10 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -294,7 +294,7 @@ function usersettings_pagesetup() { * * @param array $page Pages array * - * @return void + * @return bool * @access private */ function usersettings_page_handler($page) { @@ -304,7 +304,7 @@ function usersettings_page_handler($page) { $page[0] = 'user'; } - if ($page[1]) { + if (isset($page[1])) { $user = get_user_by_username($page[1]); elgg_set_page_owner_guid($user->guid); } else { @@ -324,12 +324,14 @@ function usersettings_page_handler($page) { $path = $CONFIG->path . "pages/settings/tools.php"; break; case 'user': - default: $path = $CONFIG->path . "pages/settings/account.php"; break; } - require($path); + if (isset($path)) { + require $path; + return true; + } } /** |