<p>This issue is caused by the presence of the <code>{% requireLogin %}</code> tag in one of your Craft templates. Remove the tag from the template in question, and the redirect should work as expected.</p>

<p>Craft Docs: <a href="https://craftcms.com/docs/templating/requirelogin" rel="nofollow noreferrer">https://craftcms.com/docs/templating/requirelogin</a></p>

CC BY-SA 3.0
2017-04-28T14:31:32.870Z
2017-04-28T14:31:32.870Z
Andrea DeMers
<p>Craft 2.6.2963</p>

<p>I've got a password reset form on the front end which works correctly sending the email. However it doesn't redirect on submit, unless you are loggedin. </p>

<p>redirect works if logged in, but if I'm logged in I wouldn't be resetting my password. How to get the redirect working correctly?</p>

<p>This is my entire form:</p>

<pre><code>&lt;form method="post" accept-charset="UTF-8"&gt;
    {{ getCsrfInput() }}
    &lt;input type="hidden" name="action" value="users/sendPasswordResetEmail"&gt;
    &lt;input type="hidden" name="redirect" value="/password-reset-notice"&gt;

    &lt;h3&gt;&lt;label for="loginName"&gt;Username or email&lt;/label&gt;&lt;/h3&gt;

    &lt;li class="form__form-group form-group"&gt;
        &lt;label class="form__label" for="email"&gt;Email Address&lt;/label&gt;
        &lt;input class="form__field form-control" type="text" name="loginName" id="loginName" placeholder="Email Address" value="{% if loginName is defined %}{{ loginName }}{% else %}{{ craft.session.rememberedUsername }}{% endif %}"/&gt;
    &lt;/li&gt;

    {% if errors is defined %}
        &lt;ul class="errors"&gt;
            {% for error in errors %}
                &lt;li&gt;{{ error }}&lt;/li&gt;
            {% endfor %}
        &lt;/ul&gt;
    {% endif %}

    &lt;li class="form__form-group form-group"&gt;
        &lt;input type="text" name="comment" tabindex="-1" class="form__field form__field--comment" /&gt;
        &lt;button class="form__submit button button--lg" type="submit"&gt;Submit ›&lt;/button&gt;
    &lt;/li&gt;
&lt;/form&gt;
</code></pre>

CC BY-SA 3.0
2017-04-26T20:14:16.187Z
Is there a `{% requireLogin %}` somewhere? Such as in `password-reset-notice`?
Andrea DeMers
CC BY-SA 3.0
2017-04-27T21:38:56.183Z
Yes and if you put that as an answer I'll mark it correct
CreateSean
<form><redirect><password>
Redirect on front end Password Redirect not working
# Redirect on front end Password Redirect not working

(Asked by: username_0 on 2017-04-24)

Craft 2.6.2963
I've got a password reset form on the front end which works correctly sending the email. However it doesn't redirect on submit, unless you are loggedin. 
redirect works if logged in, but if I'm logged in I wouldn't be resetting my password. How to get the redirect working correctly?
This is my entire form:

    {{ getCsrfInput() }}
    
    

    Username or email

    
        Email Address
        
    

    {% if errors is defined %}
        
            {% for error in errors %}
                {{ error }}
            {% endfor %}
        
    {% endif %}

    
        
        Submit ›

**Tags:** form, redirect, password
> **Comments:**
> **username_1**: Is there a `{% requireLogin %}` somewhere? Such as in `password-reset-notice`?  
> **username_0**: Yes and if you put that as an answer I'll mark it correct  

---

## 1 answers

### Answer by username_1 on 2017-04-28. Score: 1 | Accepted answer

This issue is caused by the presence of the `{% requireLogin %}` tag in one of your Craft templates. Remove the tag from the template in question, and the redirect should work as expected.

Craft Docs: <https://craftcms.com/docs/templating/requirelogin>


---

