MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / send_reset_password_instructions

Function send_reset_password_instructions

web/pgadmin/browser/__init__.py:952–967  ·  view source on GitHub ↗

Sends the reset password instructions email for the specified user. :param user: The user to send the instructions to

(user)

Source from the content-addressed store, hash-verified

950if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
951
952 def send_reset_password_instructions(user):
953 """Sends the reset password instructions email for the specified user.
954
955 :param user: The user to send the instructions to
956 """
957 token = generate_reset_password_token(user)
958 reset_link = url_for('browser.reset_password', token=token,
959 _external=True)
960
961 send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'), user.email,
962 'reset_instructions',
963 user=user, reset_link=reset_link)
964
965 reset_password_instructions_sent.send(
966 current_app._get_current_object(),
967 user=user, token=token)
968
969 @blueprint.route("/reset_password", endpoint="forgot_password",
970 methods=['GET', 'POST'])

Callers 1

forgot_passwordFunction · 0.85

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected