diff options
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r-- | engine/lib/users.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 37a6b5bbd..d32dc5c0a 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1159,8 +1159,9 @@ *
*/
function collections_submenu_items() {
- global $CONFIG;
- add_submenu_item(elgg_echo('friends:collections'), $CONFIG->wwwroot . "pg/collections/" . $_SESSION['user']->username);
+ global $CONFIG; + $user = get_loggedin_user();
+ add_submenu_item(elgg_echo('friends:collections'), $CONFIG->wwwroot . "pg/collections/" . $user->username);
add_submenu_item(elgg_echo('friends:collections:add'),$CONFIG->wwwroot."pg/collections/add");
}
@@ -1300,8 +1301,10 @@ global $CONFIG;
// Set up menu for logged in users
- if (isloggedin())
- add_menu(elgg_echo('friends'), $CONFIG->wwwroot . "pg/friends/" . $_SESSION['user']->username);
+ if (isloggedin()) { + $user = get_loggedin_user();
+ add_menu(elgg_echo('friends'), $CONFIG->wwwroot . "pg/friends/" . $user->username); + }
register_page_handler('friends','friends_page_handler');
register_page_handler('friendsof','friends_of_page_handler');
|