Skip to content

Instantly share code, notes, and snippets.

@Grinderofl
Created June 2, 2011 13:08
Show Gist options
  • Save Grinderofl/1004387 to your computer and use it in GitHub Desktop.
Save Grinderofl/1004387 to your computer and use it in GitHub Desktop.
PHP CakePHP: Testing Gist
<?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