[IMP] auth_ldap, auth_openid, base_crypt: update login_date instead of date on res.users.

bzr revid: tde@openerp.com-20120810141219-qa0howq34k03ynxh
This commit is contained in:
Thibault Delavallée 2012-08-10 16:12:19 +02:00
parent 67480c3823
commit 7657aedc4e
3 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class users(osv.osv):
cr, SUPERUSER_ID, conf, login, entry)
if user_id:
cr.execute("""UPDATE res_users
SET date=now() AT TIME ZONE 'UTC'
SET login_date=now() AT TIME ZONE 'UTC'
WHERE login=%s""",
(tools.ustr(login),))
cr.commit()

View File

@ -66,7 +66,7 @@ class res_users(osv.osv):
else:
with utils.cursor(db) as cr:
cr.execute("""UPDATE res_users
SET date=now() AT TIME ZONE 'UTC'
SET login_date=now() AT TIME ZONE 'UTC'
WHERE login=%s AND openid_key=%s AND active=%s RETURNING id""",
(tools.ustr(login), tools.ustr(password), True))
res = cr.fetchone()

View File

@ -213,7 +213,7 @@ class users(osv.osv):
# Check if the encrypted password matches against the one in the db.
cr.execute("""UPDATE res_users
SET date=now() AT TIME ZONE 'UTC'
SET login_date=now() AT TIME ZONE 'UTC'
WHERE id=%s AND password=%s AND active
RETURNING id""",
(int(id), encrypted_pw.encode('utf-8')))