Hello,
How can I configure the Auth component so that
it will redirect me to the login action of my admins_controller
everytime someone access an unauthorized page?
I see that it redirects me to the login action of my user_controller
which I don't want to happen.
Here is a snippet of my app_controller.php
<?php
class AppController extends Controller {
var $components = array('Auth');
function beforeFilter()
{
$this->Auth->loginRedirect = array('controller' => 'mainpage',
'action' => 'home');
$this->Auth->logoutRedirect = array('controller' => 'mainpage',
'action' => 'home');
$this->Auth->allow('home');
$this->Auth->authorize = 'controller';
$this->set('loggedIn', $this->Auth->user('id'));
}
function isAuthorized()
{
return true;
}
}
?>
Thanks,
Mario
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---