// this hooks into the lists controller from frontend, and will run before each action.
Yii::app()->hooks->addAction('frontend_controller_lists_before_action', function(CAction $action){
// see apps/frontend/controllers/ListsController.php Line 451 to see how below event is raised and with what params
$action->controller->callbacks->onSubscriberSaveSuccess = function(CEvent $event){
if ($event->params['action'] != 'subscribe-confirm') {
return;
}
$list = $event->params['list'];
$subscriber = $event->params['subscriber'];
// do your custom code from now on.
};
});
Thanks, I got it to work.You could solve it with a callback from an extension/theme like:
PHP:// this hooks into the lists controller from frontend, and will run before each action. Yii::app()->hooks->addAction('frontend_controller_lists_before_action', function(CAction $action){ // see apps/frontend/controllers/ListsController.php Line 451 to see how below event is raised and with what params $action->controller->callbacks->onSubscriberSaveSuccess = function(CEvent $event){ if ($event->params['action'] != 'subscribe-confirm') { return; } $list = $event->params['list']; $subscriber = $event->params['subscriber']; // do your custom code from now on. }; });