From 623485b41b526b73419e9341a521000d25a7eeec Mon Sep 17 00:00:00 2001 From: Yogesh Sakhreliya Date: Tue, 4 Jan 2011 10:14:46 +0530 Subject: [PATCH] [FIX] old password check using check method in res.users. bzr revid: ysa@tinyerp.com-20110104044446-x8407oskmg92ecg0 --- bin/addons/base/res/res_user.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index 103cc27..cf6b469 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -477,10 +477,9 @@ class users(osv.osv): cr.close() def change_password(self, cr, uid, ids, old_passwd, new_passwd): - if self.browse(cr, uid, uid).password != old_passwd: - raise osv.except_osv(_('AccessDenied'), 'The old password does not match !') - else: - self.write(cr, uid, uid, {'password': new_passwd}) + for id in ids: + if self.check(cr.dbname, id, old_passwd): + self.write(cr, uid, uid, {'password': new_passwd}) return True users() -- 1.7.10.4