On Mar 18, 1:09 pm, "pierrerot...@gmail.com" <pierrerot...@gmail.com>
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'us...@example.com'), (u'user2', u'Second
User', u'us...@example.com')]


:::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 trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to