Beispiel #1
0
    def send_reset_password_instructions(user):
        """Sends the reset password instructions email for the specified user.

        :param user: The user to send the instructions to
        """
        token = generate_reset_password_token(user)
        reset_link = url_for('browser.reset_password', token=token,
                             _external=True)

        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'), user.email,
                  'reset_instructions',
                  user=user, reset_link=reset_link)

        reset_password_instructions_sent.send(
            current_app._get_current_object(),
            user=user, token=token)
Beispiel #2
0
    def send_reset_password_instructions(user):
        """Sends the reset password instructions email for the specified user.

        :param user: The user to send the instructions to
        """
        token = generate_reset_password_token(user)
        reset_link = url_for('browser.reset_password',
                             token=token,
                             _external=True)

        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'),
                  user.email,
                  'reset_instructions',
                  user=user,
                  reset_link=reset_link)

        reset_password_instructions_sent.send(
            current_app._get_current_object(), user=user, token=token)
Beispiel #3
0
def send_reset_password_instructions(user):
    """Sends the reset password instructions email for the specified user.
    :param user: The user to send the instructions to
    """
    token = generate_reset_password_token(user)

    url_data = urlparse(request.base_url)
    reset_link = f"{url_data.scheme}://{url_data.netloc}/#resetpass/{token}/"

    if config_value('SEND_PASSWORD_RESET_EMAIL'):
        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'),
                  user.email,
                  'reset_instructions',
                  user=user,
                  reset_link=reset_link)

    reset_password_instructions_sent.send(app._get_current_object(),
                                          user=user,
                                          token=token)
Beispiel #4
0
def send_reset_password_instructions(user):
    """Sends the reset password instructions email for the specified user.
    :param user: The user to send the instructions to
    """
    token = generate_reset_password_token(user)
    reset_link = frontend_url('reset-password', token=token)

    print(f"[+] The security is {_security}")

    if config_value('SEND_PASSWORD_RESET_EMAIL'):
        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'),
                  user.email,
                  'reset_instructions',
                  user=user,
                  reset_link=reset_link)

    reset_password_instructions_sent.send(app._get_current_object(),
                                          user=user,
                                          token=token)