Hi,
I have problems execute certain piece of code on some triggers.
trigger: onAfterLogout
problem: doesnt execute javascript, php or setting of session variables.
If I change to trigger: onStartUsersList everything work as expected.
[code:1]
// Initiate the trigger:
global $_PLUGINS;
$_PLUGINS->registerFunction('onAfterLogout', 'afterlogout');
$_PLUGINS->registerFunction('onStartUsersList','afterlogout');
// Establish the trigger function:
function afterlogout($myUser) {
$session = JFactory::getSession();
$session->set('somevariable', "somevalue"«»);
echo "<script type=\"text/javascript\">";
echo "window.open('http://someadress.no','_blank');";
echo "</script>";
}[/code:1]
I guess its something wrong with my understanding of the onAfterLogout trigger? I experienced similar problems with 'onAfterUserUpdate' but I solved the problem with writing temporary to DB. So I guess its something with not rendering output after some triggers?
Hope someone can help me with this one.
-Kristian-