You can read the info you set during Auth in the view. In my case, I
have a variable Auth.User.is_admin, which I then read like this at the
top of the default layout, default.ctp

$isAdmin = $session->read('Auth.User.is_admin');

Then later in the view, I determine whether or not to show the admin
elements or just the user elements:

if ($isAdmin) {
    echo $this->element(... admin version ...);
} else {
    echo $this->element(... user version ...);
}

...Brenda




On May 18, 8:10 am, Ernesto <[email protected]> wrote:
> Hello.
>
> i have 3 elements "standard_leftbar", "admin_leftbar" and
> "customer_leftbar".
>
> is there any smart way to render one of those elements in my view,
> based on User's group_id, provided by the Auth component?
>
> sry for my bad english
>
> bye
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to