
Untitled
By: a guest on
Aug 12th, 2012 | syntax:
None | size: 0.72 KB | hits: 10 | expires: Never
<?php
class UsersController extends AppController {
var $name ='users';
var $components = array('Auth','Session');
var $view = 'Theme';
var $theme = 'intellimedia';
var $layout = 'admin';
function login() {
}
function logout() {
$this->redirect($this->Auth->logout());
}
function beforeFilter() {
$this->Auth->fields = array('username' => 'username', 'password' => 'password');
$this->Auth->loginAction = array('admin' => false, 'controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'admin', 'action' => 'index');
$this->Auth->loginError = 'Incorrect username / password.';
$this->Auth->logoutRedirect = '/';
}
}
?>