Created
June 2, 2011 13:08
-
-
Save Grinderofl/1004387 to your computer and use it in GitHub Desktop.
PHP CakePHP: Testing Gist
This file contains 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 | |
class AppController extends Controller { | |
var $components = array('Auth', 'Session'); | |
var $helpers = array('Html', 'Javascript', 'Form', 'Session'); | |
function beforeFilter() { | |
parent::beforeFilter(); | |
$this->Auth->loginRedirect = array( | |
'controller' => 'medias', | |
'action' => 'index' | |
); | |
$this->Auth->fields = array( | |
'username' => 'email', | |
'password' => 'password' | |
); | |
$this->Auth->loginAction = array( | |
'controller' => 'users', | |
'action' => 'login', | |
); | |
$this->Auth->autoRedirect = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment