Guest User

Untitled

a guest
Jan 6th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. class AdminController extends Zend_Controller_Action
  4. {
  5.  
  6. public function init()
  7. {
  8. /* Initialize action controller here */
  9. }
  10.  
  11. public function indexAction()
  12. {
  13. $form = new Application_Form_Login();
  14. $this->view->form = $form;
  15.  
  16. $auth = new Application_Model_Auth();
  17.  
  18. $request = $this->getRequest();
  19.  
  20. if($auth->checkRequest($request, $form)) {
  21. $this->_helper->redirector('index', 'index');
  22. }
  23. }
  24.  
  25. public function logoutAction()
  26. {
  27. Zend_Auth::getInstance()->clearIdentity();
  28. $this->_helper->redirector('index');
  29. }
  30. }
Add Comment
Please, Sign In to add comment