Hey,
Im trying to do smth like that: if user has not confirmed his account - show
him a notice message in every website page, so i tried to write front
controller plugin for that (the goal is to prepend layout()->content with
that message:
public function dispatchLoopShutdown()
{
if (Zend_Auth::getInstance()->hasIdentity()
&& Zend_Registry::isRegistered('Session_Default')
) {
$sess = Zend_Registry::get('Session_Default');
if (isset($sess->user->confirmed) && !$sess->user->confirmed) {
$layout =
Zend_Controller_Action_HelperBroker::getStaticHelper('layout')
$msgContent = 'YOU DID NOT CONFIRMED ';
$contentKey = $layout->getContentKey();
$layout->assign($contentKey, $msgContent .
$layout->$contentKey);
// here everything is OK
// echo $layout->$contentKey
}
}
}
So if I echo the content in plugin - it is what it should be but in website
there are NO message appended ://
What I am missing here?