LILOR: Log In Log Out Redirect
Thank you for using/testing it.
Yours friendly,
Abu Fahim Ismail.
BSD3. Feel free to modify but try to keep author's link if it is in there somewhere. ;)
#Change Logs
@Version 1.0.1
- Fix incorrect uninstall.
@Version 1.0.0
- Initial release.
This mod is not fully hook yet because I have not test it using action hooks for it i.e. integrate_action_login_after and integrate_action_logout_after. I forgot all about it until I review other posts relating to hook.
Do you think that these modification code can be added via the above mentioned action hooks instead?
1. integrate_action_login_after
global $modSettings;
if (!empty($modSettings['login_redirect_enable']) && !empty($modSettings['login_redirect_url']))
{
if (empty($_SESSION['login_url']))
$_SESSION['login_url'] = $modSettings['login_redirect_url'];
}
2. integrate_action_logout_after
global $modSettings;
if (!empty($modSettings['logout_redirect_enable']) && !empty($modSettings['logout_redirect_url']))
{
if (empty($_SESSION['logout_url']))
$_SESSION['logout_url'] = $modSettings['logout_redirect_url'];
}
I will test later when I am on my own laptop.
Edited: Naaah... I can test it here too and it is working. It is fully hook now.
Edited again: Noooo... It was the leftovers from the unhook version. It's not working. :( :( :(
#Change Logs
@Version 1.0.1
- Fix incorrect uninstall.
Just to be sure on what I'm going to ask: what does the addon do?
Redirect on login and/or logout.
I'm pretty sure I have understood where it does redirect, but if I were a "normal" user, I would ask "are not members already redirected on login?".
So, I guess the description is something like:
Just because these days I'm in a psychopathic mood. :P
Yup. That should be right. He will be redirected to a page chosen by admin on login and logout via this addon.