I'm assuming the user database table has a group_id therefore you can
just use the User belongsTo Group association and it will be automagic

$data = $this->User->findById($this->Session->read('User.id');
$groupName = $data['Group']['name'];

Geoff
--
http://lemoncake.wordpress.com

On Aug 3, 1:27 pm, 1/2 aßrain <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> Maybe I'm having a blonde moment, but... say I have 2 models
>
> Groups hasMany Users..
>
> >From the UserController, how do I get access the Group details? To get
>
> the GroupName?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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