I think you'll find that the $this->name is "Users", not "User".
For our applications with simple authentication, I define another
controller variable called $public_actions, which is an array of
action names that do not need any authentication (as there are usually
only a couple of these). So,
Hi
I have using the app_controller to redirect the request if the session
is not valid.But
the page isn't redirecting properly .Firefox has detected that the
server is redirecting the request for this address in a way that will
never complete.
if I comment the lines:
$this->redirect('/users/login'
This is because beforeFilter runs on all requests, including on /users/
login . So if you don't explicitly check for this (and any other
pages where you don't need to be logged in to access), then it will
see you are not logged in, and redirect you to /users/login. This is
causing an infinite re
yeah!! that worked just fine! thanks
however, now I'm getting another error by the browser:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
if I comment the lines:
$this->redirect('/users/log
You should look at the example in the Manual. It does not use
__construct(), it uses beforeFilter. The reason for this is the
components are not loaded in the constructor of the Controller.
http://manual.cakephp.org/appendix/simple_user_auth
--~--~-~--~~~---~--~~
checkSession())
$this->layout = 'default';
else
$this->layout = 'login';
}
function checkSession() {
// If the session info hasn't been set...
if (!$this->Session->check('User')) {
No, but I just added
var $components = array('session');
and the error continues.
On Oct 24, 1:38 pm, dardosordi <[EMAIL PROTECTED]> wrote:
> Are you using the session component?
>
> On Oct 24, 3:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I'm using cake 1.1.17, and am followi
Post the code from your app controller so we can take a look.
-m
On Oct 24, 2:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm using cake 1.1.17, and am following the Simple User Authentication
> example from the manual (http://manual.cakephp.org/appendix/
> simple_user_auth), and I
Are you using the session component?
On Oct 24, 3:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm using cake 1.1.17, and am following the Simple User Authentication
> example from the manual (http://manual.cakephp.org/appendix/
> simple_user_auth), and I get the following error when I
I'm using cake 1.1.17, and am following the Simple User Authentication
example from the manual (http://manual.cakephp.org/appendix/
simple_user_auth), and I get the following error when I write the
checkSession function in the app_controller.php file:
Notice: Undefined property: PagesController::
10 matches
Mail list logo