]> dev.renevier.net Git - syj.git/blob - application/controllers/plugins/SyjLoggedUser.php
syj session controller helper
[syj.git] / application / controllers / plugins / SyjLoggedUser.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_Controllers_Plugins_SyjLoggedUser extends Zend_Controller_Plugin_Abstract
6 {
7     public function postDispatch(Zend_Controller_Request_Abstract $request) {
8         $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
9         $view = $viewRenderer->view;
10         $sessionHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('SyjSession');
11         $view->loggedUser = $sessionHelper->user();
12     }
13 }