And yea thats exactly what i said in the bottom of my email...
I was looking for more of a technical reply as to why the logout function was only working if the logout method wasn't requiring a login to view..
On Mon, Mar 18, 2013 at 11:35 PM, lowpass <zijn.digital@gmail.com> wrote:
There's no need to allow people to hit your logout action if they're
not authenticated as the sole purpose of it is to remove their
authenticated status. That is, only authenticated users should ever be
visiting that URL.
On Mon, Mar 18, 2013 at 8:36 AM, Nicholas Mitchell <nickmit87@gmail.com> wrote:
> Hey people,
>
> I'm new to CakePHP and just learning from the tutorials atm,
> I've followed the blog & authentication tutorials and all is going good, i
> like how simple cake is :) But i've came across 1 problem and that is
> logging out..
>
> To make it work i've added 'logout' within the
>
>
> public function beforeFilter() {
> $this->Auth->allow('index', 'view','logout');
> }
>
> Where as in the tutorial it doesn't say add it, it also says the following.
>
> "What we did in the beforeFilter function was to tell the AuthComponent to
> not
> require a login for all index and view actions, in every controller. We want
> our visitors to be able to read and list the entries without registering in
> the
> site."
>
> link:
> http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html#authentication-login-and-logout
>
> So to make it work i've added a logout method to a function that is to allow
> pages to be viewed without a login..
> Does this make sense? Why would you need to allow a logout page to be
> veiewable without a login to logout?.
>
> love to hear back people as I want to know if i'm doing this right.
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment