0

We want the email sent with the reset link, but the link being sent is giving an error: "The form you submitted contained the following errors The password reset token does not appear to be valid. Please check the link you followed."

Link sent: http://XXXXX?ACT=17&id={resetcode}

EE2.10.1 Email sent using Freemember

There is a row in the "exp_reset_password" table that has the resetcode exactly matching the one in the email.

Thanks for your help in advance.

FORM CODE:

{exp:freemember:forgot_password form:id="forgotPasswordForm" return="profile/forgot_sent"}
    <div class="step" id="step1" data-step="1">
        <div class="pg-lo-header">LOGIN</div>
            <div class="pg-lo-body">
            <strong>Forgot password?</strong><br/><br/>
            <div class="pg-sing-lable">Tell us your email address and we will send you a temporary password.  You can choose a new password when you login.</div>
            <div class="field-wrapper row">
                <input type="email" name="email" id="email" placeholder="Email" class="required" value="{email}"><br />
                {if "{error:email}" != ""}<div class="errorMsg">{email} does not exist.</div>{/if}
            </div>
            <div class="po-popup-btns">
              <a class="btn btn-reset-password" id="close" href="javascript:void(0);">SEND EMAIL</a>
            </div>
        </div>
    </div>
    <div class="step hide" id="step2" data-step="2">
        <div class="pg-lo-header">LOGIN</div>
            <div class="pg-lo-body">
            <strong>Forgot password?</strong><br/><br/>
            <div class="pg-sing-lable">Email Sent.</div>

           <div class="po-popup-btns">
              <a class="btn btn-close" id="close" href="javascript:void(0);">OK</a>
            </div>
        </div>
    </div>
{/exp:freemember:forgot_password}

Submit listener:

$(".btn-reset-password").live("click",function(e){
        var _form = $(this).closest("form");
        e.preventDefault();
        if (validateForm(_form)) {
            $.ajax({
                url: _form.attr("action"),
                data: _form.serialize(),
                dataType: 'html',
                type: 'POST',
                success: function(resp){
                    console.log(resp);
                    if ($(resp).find("input").length == 0) {
                        //console.log($(resp).find("input"));
                        gotoStep(2);
                    } else {
                        $(".po-popup").html(resp);
                    }
                },
                error: function(){
                    console.log("error submitting");
                }
            });
        } else {
            console.log("error");
        }
    })

1 Answer 1

1

I had the exact same problem. It looks as though EE's native password reset doesn't understand Freemember's reset code.

I was able to fix this issue by creating a template with Freemember's reset password tag and passed the folder and file name to Freemember's forgot_password tag as a reset parameter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.