web/application.py
changeset 6427 c8a5ac2d1eaa
parent 6333 e3994fcc21c3
child 6570 7e9a1a5919e8
equal deleted inserted replaced
6426:541659c39f6a 6427:c8a5ac2d1eaa
   222         return session
   222         return session
   223 
   223 
   224     def _update_last_login_time(self, req):
   224     def _update_last_login_time(self, req):
   225         # XXX should properly detect missing permission / non writeable source
   225         # XXX should properly detect missing permission / non writeable source
   226         # and avoid "except (RepositoryError, Unauthorized)" below
   226         # and avoid "except (RepositoryError, Unauthorized)" below
   227         if req.user.cw_metainformation()['source']['adapter'] == 'ldapuser':
   227         if req.user.cw_metainformation()['source']['type'] == 'ldapuser':
   228             return
   228             return
   229         try:
   229         try:
   230             req.execute('SET X last_login_time NOW WHERE X eid %(x)s',
   230             req.execute('SET X last_login_time NOW WHERE X eid %(x)s',
   231                         {'x' : req.user.eid})
   231                         {'x' : req.user.eid})
   232             req.cnx.commit()
   232             req.cnx.commit()