C'mon man- do some searching. I suggest looking at the api at auth
component properties.
HTH

2008/8/24, mario <[EMAIL PROTECTED]>:
>
> 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
>
>
> >
>


-- 
Marcin Domanski
http://kabturek.info

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to