Skip to content

Instantly share code, notes, and snippets.

@gurneyalex
Created January 30, 2018 08:41
Show Gist options
  • Save gurneyalex/9e34a0d0a40494be2f600c9ba51b9abf to your computer and use it in GitHub Desktop.
Save gurneyalex/9e34a0d0a40494be2f600c9ba51b9abf to your computer and use it in GitHub Desktop.
diff --git a/addons/auth_crypt/models/res_users.py b/addons/auth_crypt/models/res_users.py
index 708998a..2c7d9b8 100644
--- a/addons/auth_crypt/models/res_users.py
+++ b/addons/auth_crypt/models/res_users.py
@@ -28,11 +28,11 @@ class ResUsers(models.Model):
def init(self):
_logger.info("Hashing passwords, may be slow for databases with many users...")
- self.env.cr.execute("SELECT id, password FROM res_users"
- " WHERE password IS NOT NULL"
- " AND password != ''")
- for uid, pwd in self.env.cr.fetchall():
- self.sudo().browse(uid)._set_password(pwd)
+ # self.env.cr.execute("SELECT id, password FROM res_users"
+ # " WHERE password IS NOT NULL"
+ # " AND password != ''")
+ # for uid, pwd in self.env.cr.fetchall():
+ # self.sudo().browse(uid)._set_password(pwd)
password = fields.Char(compute='_compute_password', inverse='_inverse_password', invisible=True, store=True)
password_crypt = fields.Char(string='Encrypted Password', invisible=True, copy=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment