Ok I checked some more:
The Auth isAuthorized fails here:
function isAuthorized($type = null, $user = null, $object = null) {
if (empty($user) && !$this->user()) {//THIS IS CALLED, FAILS
HERE.
return false;
}
}
So I went and checked the Auth->user() function and this was the
result:
function user($key = null) {
$this->__setDefaults();
if (!$this->Session->check($this->sessionKey)) {//THIS IS CALLED,
FAILS HERE.
return null;
}
}
Which means it doesn't recognize the user.
Then I noticed that no sessionKey was set.. So I set the session's
key.
$this->Auth->sessionKey = 'AdminUser';
Now it works. I thought Cake does that for me. :-)
thanks a lot for your precious help!
On Aug 10, 1:53 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 8/10/07, phpjoy <[EMAIL PROTECTED]> wrote:
>
>
>
> > everything.
> > i tried:
> > $this->Auth->authorize = '*';
>
> This is not a valid option
>
> > and:
> > $this->Auth->authorize = 'controller';
>
> Ummm.... this typically goes in your app_controller beforeFilter -
> there are several ways you can use the auth component
>
> try -
>
> http://www.ogrn.com/andy/2007/07/10/auth-changes-in-cakephp-12-and-ho...
>
> or
>
> http://www.littlehart.net/atthekeyboard/2007/07/28/two-headed-applica...
>
> Also do note that the Auth component is bit of a moving target right now...
>
> HTH
> Tarique
>
> --
> =============================================================
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =============================================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---