UserIdentity view helper
1 2 3 4 56 7 8 9 1011 12 13 14 1516 17 18 19 | <?php /** * UserIdentity view helper * * @author Balazs Varkonyi <varkonyi.balazs@linuxforge.hu> * @copyright 2008, Balazs Varkonyi **/ class App_View_Helper_UserIdentity { function userIdentity() { if (!Zend_Auth::getInstance()->hasIdentity()) { return false; } return Zend_Auth::getInstance()->getIdentity(); } } ?> |
Comments
This is a simple, helpful concept, but supporting more authentication methods than simply Zend_Auth would be much more in the spirit of the entire framework.
You must login before commenting on a snippet. If you do not have an account, please register.
2 years ago
Nice and simple. Up.