equal
deleted
inserted
replaced
51 # associate the connection to the current request |
51 # associate the connection to the current request |
52 req.set_connection(cnx, user) |
52 req.set_connection(cnx, user) |
53 return cnx |
53 return cnx |
54 |
54 |
55 def login_from_email(self, login): |
55 def login_from_email(self, login): |
|
56 # XXX should not be called from web interface |
56 session = self.repo.internal_session() |
57 session = self.repo.internal_session() |
57 try: |
58 try: |
58 rset = session.execute('Any L WHERE U login L, U primary_email M, ' |
59 rset = session.execute('Any L WHERE U login L, U primary_email M, ' |
59 'M address %(login)s', {'login': login}) |
60 'M address %(login)s', {'login': login}) |
60 if rset.rowcount == 1: |
61 if rset.rowcount == 1: |