Ok so the problem is that i have users who are admins and users who are not.
but the users who dont have admin acess which is represent by 0 on the db
still get on it
//Database
DB T Schema:
id
username varchar
password varchar
admin tiny_int(1)
//Controller class
class AdminsController extends AppController {
var $name = 'Admins';
var $uses = array('User');
function beforeFilter() {
parent::beforeFilter();
$this->Auth->loginAction = array('controller' => 'admins', 'action'
=> 'login');
$this->Auth->userScope = array('User.admin' => '1');
}
}
?>
Thanks in advance
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php