]> dev.renevier.net Git - syj.git/blob - application/controllers/plugins/SyjLoggedUser.php
routes profile
[syj.git] / application / controllers / plugins / SyjLoggedUser.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010-2011 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         if (!$view) {
11             return;
12         }
13         $helper = Zend_Controller_Action_HelperBroker::getStaticHelper('SyjUserManager');
14         $view->loggedUser = $helper->current();
15     }
16 }