web/views/authentication.py
branchtls-sprint
changeset 1664 03ebeccf9f1d
parent 1663 89efe0e744cf
child 1690 e4f7d2ddc99a
equal deleted inserted replaced
1663:89efe0e744cf 1664:03ebeccf9f1d
    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: