Search code examples
tracuser-accounts

Retrieve a list of all users in Trac


Is there a way to get all users of the current Trac environment via Python? Similar to model.Priority.select(self.env) which returns a list of all priorities. Maybe there is a method of the Trac Account Manager?


Solution

  • Environment.get_known_users() will give you a list of all known users that have logged in. Inside a class inheriting from Component you can use self.env.get_known_users().