You can put the authentication in users_controller.php, make an
element in app/views/elements that has your login form.
Put the login form anywhere using $this->element(). When you call
your authentication, store the current url in a session and after
success, redirect to that URL. Or use ajax and not worry about the
whole redirect thing.
I do not understand why you are doing this in app_controller. When
someone logs in you store it in a session, your element can display
the login form or the user names based on an if(){}.
In your auth script, you can store the
On May 20, 9:45 am, Knud Soerensen <[EMAIL PROTECTED]> wrote:
> Filip Camerman wrote:
> > Hi,
> > The bit of code you pasted does give the impression that you have some
> > things mixed up. For an example of simple user login, read
> >http://book.cakephp.org/view/327/simple-user-authentication.
>
> The problem with the example is that it is to simple !
>
> First I don't like the idea that the user gets redirected to
> a login page, if he is not login.
>
> I wan't every page to display a login bar if the user is not logged in.
>
> Also I can't use the auth component because I use openid so
> my user model don't have a password field.
>
> I seams to me that i would have to write my own auth component
> to archive what I want or is the another way ??
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---