Wherever this code is in the super_dashboard.php <?php echo $_SESSION['user']->username; ?>
It does not show up on the site and some of the links don't work like edit profile, edit avatar, view files from user
for edit profile link is just http://mysite.com/profile/edit instead of http://mysite.com/profile/"whatever_user_here"/edit
/"whatever_user_here" should be replaced by the user logged in that wants to edit profile but it does not show up in the link it just links to http://mysite.com/profile/edit
same goes for everything that has this code <?php echo $_SESSION['user']->username; ?> placed in the link.
I do use @mentions if thats the issue, what do I need to change this code to work <?php echo $_SESSION['user']->username; ?>
Here is the full code:
<a class="box" href="<?php echo elgg_get_site_url(); ?>profile/<?php echo $_SESSION['user']->username; ?>/edit" style="background: #43b51f;">
<span>Edit Profile</span>
<img class="icon" src="<?php echo elgg_get_site_url(); ?>mod/super_dashboard/images/phone.png" alt="" />
</a>
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.
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Digital Coin Forums - Social Crypto Network@coin_forums
Digital Coin Forums - Social Crypto Network - 0 likes
- Digital Coin Forums - Social Crypto Network@coin_forums
Digital Coin Forums - Social Crypto Network - 0 likes
- Digital Coin Forums - Social Crypto Network@coin_forums
Digital Coin Forums - Social Crypto Network - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Digital Coin Forums - Social Crypto Network@coin_forums
Digital Coin Forums - Social Crypto Network - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
You must log in to post replies.Use elgg_get_logged_in_user_entity() instead
If that still doesn't work then it's because no one is logged in :)
Neither of those 2 worked could itbe something elses then elgg_get_logged_in_user_entity() I am using 1.9.4
I tried this:
<a class="box" href="<?php echo elgg_get_site_url(); ?>profile/<?php echo elgg_get_logged_in_user_entity(); ?>/edit" style="background: #43b51f;">
but it did not work, I also tried it under several logged in users.
Do i have to add this somewhere maybe? $user = elgg_get_logged_in_user_entity();
@coin_forums It's right way for your Q.
But I can help you here ;)
That worked perfectly RVR, thank you!!!
Had to put
$user = elgg_get_page_owner_entity();
between php tagslike this
<php $user = elgg_get_page_owner_entity(); ?>
but it works great now.
@RvR and @Digital Coin
Would you push those changes on github for the Metro Dashboard Plugin for elgg?
I didn't know it wasn't working.
Just pushed a new release here in the community:
https://community.elgg.org/plugins/1945410
Thanks for reporting the bugs!