mirror of
https://github.com/wassname/flask-security.git
synced 2026-09-12 12:21:37 +08:00
Stricter tests for signals and a small docs update. Fixes #308
This commit is contained in:
@@ -42,4 +42,5 @@ def change_user_password(user, password):
|
||||
user.password = encrypt_password(password)
|
||||
_datastore.put(user)
|
||||
send_password_changed_notice(user)
|
||||
password_changed.send(app._get_current_object(), user=user)
|
||||
password_changed.send(app._get_current_object(),
|
||||
user=user._get_current_object())
|
||||
|
||||
@@ -35,8 +35,7 @@ def send_login_instructions(user):
|
||||
send_mail(config_value('EMAIL_SUBJECT_PASSWORDLESS'), user.email,
|
||||
'login_instructions', user=user, login_link=login_link)
|
||||
|
||||
login_instructions_sent.send(app._get_current_object(),
|
||||
user=user, login_token=token)
|
||||
login_instructions_sent.send(app._get_current_object(), user=user, login_token=token)
|
||||
|
||||
|
||||
def generate_login_token(user):
|
||||
|
||||
@@ -35,8 +35,7 @@ def send_reset_password_instructions(user):
|
||||
'reset_instructions',
|
||||
user=user, reset_link=reset_link)
|
||||
|
||||
reset_password_instructions_sent.send(app._get_current_object(),
|
||||
user=user, token=token)
|
||||
reset_password_instructions_sent.send(app._get_current_object(), user=user, token=token)
|
||||
|
||||
|
||||
def send_password_reset_notice(user):
|
||||
|
||||
Reference in New Issue
Block a user