def groups_for_user(environ, username):

    UserModel = auth.get_user_model()
    db.reset_queries()

    try:
        try:
            user = UserModel._default_manager.get_by_natural_key(username)
        except UserModel.DoesNotExist:
            return []
        if not user.is_active:
            return []
        return [force_bytes(group.name) for group in user.groups.all()]
    finally:
        db.close_connection()
Returns `title` attribute of a category of this list.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/auth/handlers/modwsgi.py/groups_for_user--crossover with--dataset/ETHPy150Open idlesign/django-sitecats/sitecats/toolbox.py/CategoryList.get_title