Hi, how can I make it so that when someone clicks on 'logout' it takes the user to a specific logout page I create, instead of the main site? Thankyou.
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.
- elgg!gal@itskim
elgg!gal - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- elgg!gal@itskim
elgg!gal - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Tom@Thomasondiba
Tom - 0 likes
You must log in to post replies.I have the plugin "any pages" installed on my site, so I can just create any page, and I'd like to use one for the default logout page, if possible, any help? When a user clicks on logout button I'd like to show the www.mysite.com/logout page.
use the event 'logout', 'user' and forward to your desired url
Hi Matt, don't mean to sound like a idiot, but, what do you mean, use the event 'logout", 'user" ? Can you be more specific about what I should do? I just need step by step instructions herw, all I can tell you is that when someone clicks on logout, I want to have them see the logout page I create, not sure what I am going to call it yet, but most likely it will be something like: www.mysite.com/logout_landing or something... Thanks alot for the help.
<?php
elgg_register_event_handler('logout', 'user', 'myplugin_logout', 1000);
function myplugin_logout($event, $type, $object) {
forward(elgg_get_site_url() . 'logout_landing');
}
@ Kimberly! , there are elgg themes which do not play well with forward(elgg_get_site_url() . 'logout_landing'). For example, facebook related themes. If you use forward fuction, the themes will force or send you to main page, index or homepage. Mmmmm! This is not the page you want to land your users when they logout :( Try this plugin: Logout Redirector for Elgg 1.8 or "TwizaNex Logout Landing page Plugin" http://community.elgg.org/plugins/1146548/1.8.3/logout-redirector
I hope it will be of help to you.