equal
deleted
inserted
replaced
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() |