A user may have membership in groups with multiple roles: for row in db(db.auth_group.id==db.auth_membership.group_id) (db.auth_membership.user_id==auth.user.id).select(db.auth_group.ALL): print row.role
On Apr 7, 9:10 am, Monty808 <davidmontgom...@gmail.com> wrote: > Hi, > > I can get the first_name of a user loged in using > first_name=auth.user.first_name. > > I assigned roles to the user. How can I get the role using something > like role=auth.role? > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---