Discussion:
[Trac-dev] Email address lookup
Logan Anderson
2017-02-06 20:45:51 UTC
Permalink
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.
--
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 trac-dev+***@googlegroups.com.
To post to this group, send email to trac-***@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.
RjOllos
2017-02-07 04:41:21 UTC
Permalink
Post by Logan Anderson
Can anyone point me towards a reference on the appropriate most accurate
way to lookup a user based on email address?
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 trac-dev+***@googlegroups.com.
To post to this group, send email to trac-***@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...