Created
June 5, 2010 08:22
-
-
Save ixti/426448 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php //file: application/modules/admin/controllers/IndexController.php | |
| class Admin_IndexController extends Zend_Controller_Admin | |
| { | |
| public function init() | |
| { | |
| $request = $this->getRequest(); | |
| $auth = App_Auth_Admin::getInstance(); | |
| if (!$auth->hasIdentity() && ('login' !== $request->getActionName())) { | |
| $this->_helper->getHelper('Redirector') | |
| ->gotoSimple('index', 'login', 'admin'); | |
| } | |
| } | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php //file: library/App/Auth.php | |
| class App_Auth extends Zend_Auth | |
| { | |
| protected function __construct() | |
| { | |
| $this->setStorage(new Zend_Auth_Storage_Session(getclass($this))); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php //file: library/App/Auth/Admin.php | |
| class App_Auth_Admin extends App_Auth | |
| {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php //file: library/App/Auth/User.php | |
| class App_Auth_User extends App_Auth | |
| {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment