I have created a module that is listening to the customer registration event 'customer_login'. This event is dispatched after the customer has registered on the site and the site is revving up to redirect them to the customer dashboard.
My module is then logging the customer out and setting a success message:
Mage::getSingleton('core/session')->addSuccess('Thank you for registering with %s. Your account needs to be activated by an administrator.', Mage::app()->getStore()->getFrontendName());
When the site then redirects the dashboard, it checks if the customer is logged in (false) so redirects the user to the registration form again. What appears to be happening is that the success message above is being cleared in the customer dashboard so not surviving back to the registration page.
How do I get my success message to persist to the second page?
As well as the above, I have also tried customer/session
but that did not work either.