if options['pending']:
users = users.filter(is_active=False)
- labels = ('id', 'email', 'real name', 'affiliation', 'active', 'admin', 'provider')
- columns = (3, 24, 24, 12, 6, 5, 12)
+ labels = ('id', 'email', 'real name', 'active', 'admin', 'provider', 'groups')
+ columns = (3, 24, 24, 6, 5, 12, 24)
if not options['csv']:
line = ' '.join(l.rjust(w) for l, w in zip(labels, columns))
id = str(user.id)
active = format_bool(user.is_active)
admin = format_bool(user.is_superuser)
- fields = (id, user.email, user.realname, user.affiliation, active,
- admin, user.provider)
+ fields = (id, user.email, user.realname, active, admin, user.provider,
+ ','.join([g.name for g in user.groups.all()]))
if options['csv']:
line = '|'.join(fields)