app_controller auth setup


/ Published in: PHP
Save to your folder(s)

this is the entire app_controller code with auth setup and use in it.


Copy this code and paste it in your HTML
  1. <?php
  2. class AppController extends Controller {
  3. var $components = array('Auth');
  4.  
  5. function beforeFilter() {
  6. $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
  7. $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
  8. $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'index');
  9. $this->Auth->allow('*');
  10. $this->Auth->deny('delete','view','index');
  11. }
  12. }
  13. ?>

URL: http://www.jbcrawford.net/archives/45

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.