I have a custom index I created and I was good able to detect if a user is signed in, but I want to include a logout button on the page, and when I use this:
<?php echo elgg_view('output/url', array('href' => "{$vars['url']}action/logout", 'text' => elgg_echo('logout'), 'class' => "logoutlink",'is_action' => TRUE)); ?>
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
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
You must log in to post replies.Can you clarify what you mean by "does not work"? What is the intended behavior and what are you seeing instead?
Side note: avoiding elgg_view's is going to really hurt you down the line, so I strongly recommend against that approach, even though I know right now it feels like it's adding more complication to something that should be simpler.
@rp have you been hacking into the elgg core code ? the std logout code via view source is ->
if you're *not* following the stds and coding appropriately...
might be rsn why yr code in troublez..
chek the api`s and etc to figure the corect why to code this (rather simple) stuff.
Regards,
DC.