This method seems to be still in trunk (http://code.google.com/p/web2py/source/browse/gluon/tools.py#2832), as I cannot find it in the latest stable.
It takes a user id and return the name/role of the group that user is in. However, it doesn't seem to be able to work with custom groups. For example, if I do auth.settings.create_user_groups = False and create two custom groups (e.g. 'students' and 'teachers') to accomodate all the users. This auth.user_group_role() method probably will fail because it assume that every group follows the naming convention which is set by: http://code.google.com/p/web2py/source/browse/gluon/tools.py#963. Can someone confirm whether this is indeed the case. Thanks! --