On Mar 18, 1:09 pm, "[email protected]" <[email protected]>
wrote:
> I'm looking for a means to get trac user information from a python
> script. Basically, I would like to get the email address from the
> username. Is there an API dedicated to user management?
Trac don't really have user management as such, it only has whatever
is stored in sessions - which I then presume you are interested in.
You most likely find the information you need in
env.get_known_users(), which is a generator for (login, fullname,
email) tuples. Like this:
>>> from trac.env import open_environment
>>> myenv = open_environment('/path/to/trac/project')
>>> print list(myenv.get_known_users())
[(u'user1', u'First User', u'[email protected]'), (u'user2', u'Second
User', u'[email protected]')]
:::simon
https://www.coderesort.com
http://www.ohloh.net/accounts/osimons
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.