On 7/19/06, nate <[EMAIL PROTECTED]> wrote:
> (3) Or, make isLoggedIn a private method (prefixed with '_' of
> AppController, so you could call $this->_isLoggedIn() instead of using
> requestAction, which is slower, and largely pointless in your case.
>
maaannn, the things we learn here, make lif
Couple things you could do here:
(1) Change $this->action != 'login' to !in_array($this->action,
array('login', 'isLoggedIn'))
(2) Or better yet, move the isLoggedIn( ) check to the beforeFilter
itself, since that should be the only place you'd need it.
(3) Or, make isLoggedIn a private method (p
Hi Devo,
The reqestAction will be run for all controllers, including the login
controller within the requestAction call, hence the loop.
You need only introduce some logic to break the chain e.g. define the
beforeFilter in your login controller and DON'T call the parent.
HTH,
AD7six
--~--~--
After seeing some excellent posts here on the group, I've attempted to
implement some basic authentication into my CakePHP instance by
overriding the AppController class. (I don't have any roles, but I do
need basic authentication.) My beforeFilter() method works just fine
until I add the reques