On Monday, February 6, 2017 at 12:46:35 PM UTC-8, Logan Anderson wrote: > > Can anyone point me towards a reference on the appropriate most accurate > way to lookup a user based on email address? > > It looks like I can use the following statement: > select sid,name,value from session_attribute where name = 'email'; > But I'm uncertain whether this is the most accurate place to gather this > data. > > > Sorry if this is a newb question. I'm not seeing what I am looking for. >
No problem, don't hesitate to ask. Here's an example, in the GitConnector class: https://trac.edgewall.org/browser/tags/trac-1.2/tracopt/versioncontrol/git/git_fs.py?marks=350,352-353#L335 If the lookup will be done repeatedly, I'd put the email to user map in a dictionary and cache it. In fact it might be a good idea to do that in the code for GitConnector. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.
