then maybe this try...idk i'm not sure if work....
{{{
$this->Auth->authorize = 'actions';
$this->Auth->loginAction = array('controller' => 'users', 'action' =>
'login', 'prefix' => false, 'prefix2' => false);
$this->Auth->loginRedirect = array('controller' => 'users', 'action' =>
'login', 'prefix' => false, 'prefix2' => false);
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' =>
'login');
}}}
and if this doesn't work...should work this:
{{{
if (isset($this->params["admin"]) && $this->params["admin"]) { $prefix =
"admin"; } else if (isset($this->params["yourprefix"]) &&
$this->params["yourprefix"]) ///do this..... { $prefix = "yourprefix"; }
//....until u don't go through all prefixes else { $prefix = false; }
$this->Auth->authorize = 'actions'; $this->Auth->loginAction =
array('controller' => 'users', 'action' => 'login', $prefix => false);
$this->Auth->loginRedirect = array('controller' => 'users', 'action' =>
'login', $prefix => false); $this->Auth->logoutRedirect = array('controller'
=> 'users', 'action' => 'login');
///i didn't try live but it should work...
}}}
--
LP,
Tilen Majerle http://majerle.eu
2010/8/8 Marek Wojciech Urbanowicz <[email protected]>
> but i have more prefixes .. not only admin
>
> W dniu 2010-08-08 22:29, Tilen Majerle pisze:
>
> something like that
>
> {{{
> $this->Auth->authorize = 'actions';
> $this->Auth->loginAction = array('controller' => 'users',
> 'action' => 'login', 'prefix' => false); // prefix is admin
> $this->Auth->loginRedirect = array('controller' => 'users',
> 'action' => 'login', 'prefix' => false); // prefix is admin
> $this->Auth->logoutRedirect = array('controller' => 'users',
> 'action' => 'login');
> }}}
>
>
> --
> LP,
> Tilen Majerle http://majerle.eu
>
>
> 2010/8/8 Mariaczi.PL <[email protected]>
>
>> Hi!
>>
>> Is any way to disable prefixes when login is needed ?
>> I have in my app_controller:
>> {{{
>> $this->Auth->authorize = 'actions';
>> $this->Auth->loginAction = array('controller' => 'users',
>> 'action' => 'login');
>> $this->Auth->loginRedirect = array('controller' => 'users',
>> 'action' => 'login');
>> $this->Auth->logoutRedirect = array('controller' => 'users',
>> 'action' => 'login');
>> }}}
>>
>> and when i try acces /prefix/controller/action and im not logged, cake
>> redirect me to /prefix/users/login, not to /users/login or /login (i
>> have routing - login -> users/login)
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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]<cake-php%[email protected]>For
>> more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
>
>
> --
> *z poważaniem
> Marek Wojciech Urbanowicz*
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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