[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:
parent
67480c3823
commit
7657aedc4e
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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')))
|
||||
|
|
Loading…
Reference in New Issue