Exemple #1
0
def confirm_email(nonce):
    """
    Confirmation emails point to this endpoint
    It either rejects the confirmation or
    flags associated email+host to be confirmed
    """

    # get the form for this request
    form = Form.confirm(nonce)

    if not form:
        return (
            render_template(
                "error.html",
                title="Not a valid link",
                text=
                "Confirmation token not found.<br />Please check the link and try again.",
            ),
            400,
        )

    else:
        return render_template(
            "forms/form_activated.html",
            email=form.email,
            host=form.host,
            user=current_user,
        )
Exemple #2
0
def confirm_email(nonce):
    """
    Confirmation emails point to this endpoint
    It either rejects the confirmation or
    flags associated email+host to be confirmed
    """

    # get the form for this request
    form = Form.confirm(nonce)

    if not form:
        return (
            render_template(
                "error.html",
                title="Not a valid link",
                text="Confirmation token not found.<br />Please check the link and try again.",
            ),
            400,
        )

    else:
        return render_template(
            "forms/form_activated.html",
            email=form.email,
            host=form.host,
            user=current_user,
        )
Exemple #3
0
def confirm_email(nonce):
    '''
    Confirmation emails point to this endpoint
    It either rejects the confirmation or
    flags associated email+host to be confirmed
    '''

    # get the form for this request
    form = Form.confirm(nonce)

    if not form:
        return render_template('error.html',
                               title='Not a valid link',
                               text='Confirmation token not found.<br />Please check the link and try again.'), 400

    else:
        return render_template('forms/email_confirmed.html', email=form.email, host=form.host)
Exemple #4
0
def confirm_email(nonce):
    '''
    Confirmation emails point to this endpoint
    It either rejects the confirmation or
    flags associated email+host to be confirmed
    '''

    # get the form for this request
    form = Form.confirm(nonce)

    if not form:
        return render_template(
            'error.html',
            title='Not a valid link',
            text=
            'Confirmation token not found.<br />Please check the link and try again.'
        ), 400

    else:
        return render_template('forms/email_confirmed.html',
                               email=form.email,
                               host=form.host)