after_action_login()

Archived from the Xataface Users forum.

wisni1rr — Fri Apr 13, 2012 12:15 pm

Code: Select all
function after_action_login(){      echo "<script>       alert('This is a popup message');       </script>"; }

the code above is part of my ApplicationDelegate.php.

My problem is that after the alert box has displayed and the user clicks ok to close the window I get this error:

Warning: Cannot modify header information - headers already sent by (output started at …/conf/ApplicationDelegate.php:34) in …/xataface/Dataface/AuthenticationTool.php on line 281

Any ideas?


shannah — Fri Apr 13, 2012 12:31 pm

The action_after_login() trigger is fired after successfully logging in. You shouldn’t be outputting anything here. You could put a redirect here, or other book-keeping stuff… but nothing that is written to the browser.

If you want to add Javascript to a particular page you’ll want to look at blocks and slots rather than triggers.

-Steve