In app_controller, use beforeFilter callback for verify if the user is
logged in, something like this:
function beforeFilter(){
if ($this->Session->check("userInfo")){
$this->set("loggedIn", true);
}
}
in your default.ctp layout (or other), you check if $loggedIn has been
seted:
<? if (isset($loggedIn)){ ?>
your menu here
<? } ?>
It will work for show the menu... You must to remember to block you
actions too for avoid direct requests.
[]'s
On 28 jan, 14:39, jwesonga <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've built a website in where once a user logs in different toolbars
> for managing the content are displayed e.g. User john logs into the
> website and can now add/edit/delete news items. I'm wondering how I
> can pull this off, I've looked at the code for authentication in the
> cake website but it only applies for restricting access to an admin
> section of the website.
>
> I need users to have access to the full site and only be able to
> manage content once they are logged in.
>
> Any ideas how I can do this.
>
> Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---