Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Application_Model_AuthPlugin extends Zend_Controller_Plugin_Abstract
- {
- public function preDispatch(Zend_Controller_Request_Abstract $request)
- {
- $protectedModules = array ('member');
- if (in_array($request->getModuleName(), $protectedModules)) {
- if (!Zend_Auth::getInstance()->hasIdentity()) {
- $this->getResponse()->setRedirect('/auth/index');
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement