mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-09 12:00:34 +08:00
Add option to disable password change email.
This commit is contained in:
@@ -28,7 +28,8 @@ def send_password_changed_notice(user):
|
||||
|
||||
:param user: The user to send the notice to
|
||||
"""
|
||||
send_mail(config_value('EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE'), user.email,
|
||||
if config_value('SEND_PASSWORD_CHANGE_EMAIL'):
|
||||
send_mail(config_value('EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE'), user.email,
|
||||
'change_notice', user=user)
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ _default_config = {
|
||||
'PASSWORDLESS': False,
|
||||
'CHANGEABLE': False,
|
||||
'SEND_REGISTER_EMAIL': True,
|
||||
'SEND_PASSWORD_CHANGE_EMAIL': True,
|
||||
'LOGIN_WITHIN': '1 days',
|
||||
'CONFIRM_EMAIL_WITHIN': '5 days',
|
||||
'RESET_PASSWORD_WITHIN': '5 days',
|
||||
|
||||
Reference in New Issue
Block a user