From 7657aedc4ea77c9ad38fb1e177872d4d6c888837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 10 Aug 2012 16:12:19 +0200 Subject: [PATCH] [IMP] auth_ldap, auth_openid, base_crypt: update login_date instead of date on res.users. bzr revid: tde@openerp.com-20120810141219-qa0howq34k03ynxh --- addons/auth_ldap/users_ldap.py | 2 +- addons/auth_openid/res_users.py | 2 +- addons/base_crypt/crypt.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/auth_ldap/users_ldap.py b/addons/auth_ldap/users_ldap.py index e4615907c79..47fc41c3645 100644 --- a/addons/auth_ldap/users_ldap.py +++ b/addons/auth_ldap/users_ldap.py @@ -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() diff --git a/addons/auth_openid/res_users.py b/addons/auth_openid/res_users.py index 3fb8cefcbd4..506c7e1c094 100644 --- a/addons/auth_openid/res_users.py +++ b/addons/auth_openid/res_users.py @@ -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() diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index f7e200560a3..b27dad22363 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -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')))