Has anyone added a menu item that links to the user's profile page? I can't figure out the url to add to the menu to go to a logged in users profile. Any suggestions? Thanks all.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Burgs@burgs
Burgs - 0 likes
- Sharon@sharon
Sharon - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Joel Rodriguez@jpr36
Joel Rodriguez - 0 likes
You must log in to post replies.Try...
Or with image...
Joel Iam not sure its working or not..
with the help of this code we can get user name
$context = elgg_extract('context', $vars, elgg_get_context());
if (elgg_is_logged_in() && $context) {
$username = elgg_get_logged_in_user_entity()->username;
}
Then you can assign menu link like this
http://example.com/profile/$username
:)
Actually what you're looking for is the elgg_register_menu_item() function
Thanks everyone. That information worked. Cheers.