Skip to content

Commit 203e2d3

Browse files
[FIX] auth_saml: fix sending password change mail when blanking password
1 parent c229e2d commit 203e2d3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

auth_saml/models/res_users_saml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ def create(self, vals_list):
3232
# Redefined to remove password if necessary
3333
result = super().create(vals_list)
3434
if not self.env["res.users"].allow_saml_and_password():
35-
result.mapped("user_id").write({"password": False})
35+
# Avoid sending a security mail by using this method instead of a write
36+
result.mapped("user_id")._set_password_blank()
3637
return result
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix sending a mail when configuring SAML for a user.

0 commit comments

Comments
 (0)