if($this->Auth->user()) {
$this->render("index_logged_in");
}
else {
$this->render("index_logged_out");
}
On May 25, 9:24 pm, kai <k3hO...@gmail.com> wrote:
> For the sake of a better user experience I'd like to change the index
> page of my website depending on whether someone is logged in or not.
> If someone isn't logged in it should go to pages/home.ctp. If someone
> is logged in it should go to listings/search.ctp. What is a way that I
> can conditionally change the index page?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment