The User has a groups list as attribute. Group.group_name will give
you the group name.
ex:
DBSession.query(User).first().groups[0].group_name
(assuming that the first user is member of at least one group ;) )
Kind regards,
Jasper
On Nov 22, 2:21 pm, adam <[email protected]> wrote:
> Hello,
>
> I am using the TG2 authentication method and i need to get the name of
> the group a user belongs too. How do i go about searching the
> tg_user_group table for the group_id for the mathcing user_id and then
> search the tg_group table for the name?
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=.