Answers.Body: <p>For Craft 2.6, if a hidden <code>redirect</code> input is set, Craft will now follow it first and fallback to the <a href="https://craftcms.com/docs/config-settings#activateAccountSuccessPath" rel="nofollow">activateAccountSuccessPath</a> if it's not available.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T00:10:39.327Z
Answers.Text: Thanks Brad! When is 2.6 coming out? soonish? Looks like Craft is only at 2.5.2757. Is there something I can do to patch it at the moment?
Answers.UserDisplayName: Cavell Blood
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T00:24:36.940Z
Answers.Text: No ETA on 2.6, but hit up support@craftcms.com for the patched file if you want it. Just keep in mind that an auto-update could overwrite it at anytime, though.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T00:26:48.013Z
Answers.Text: That's true. Ok, I'll send for a patched file. Thanks.
Answers.UserDisplayName: Cavell Blood
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T23:36:00.537Z
Answers.Text: The patched file fixed this problem.
Answers.UserDisplayName: Cavell Blood
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-11T23:57:23.377Z
Answers.LastActivityDate: 2016-01-11T23:57:23.377Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>This probably isn't the answer you're looking for (it should be honoring your redirect) but if that's the only form being used for registrations, you could set <code>'activateAccountSuccessPath' =&gt; 'volunteer/identity'</code> in your config file.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-16T20:36:26.383Z
Answers.Text: Yes, that's true. It should be honoring the redirect. I can try that for now but I'd rather not hard code this. This should work for now. Thanks!
Answers.UserDisplayName: Cavell Blood
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-15T09:17:24.877Z
Answers.Text: @cavellblood Thank you for this heads-up. Very helpful. I will mail them too.
Answers.UserDisplayName: tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-23T10:43:32.407Z
Answers.Text: I have the same issue as OP, and since we work with e-mail address verification, this workaround isn't suitable. It should honor the right settings, indeed.
Answers.UserDisplayName: tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T23:36:59.943Z
Answers.Text: @tom: I emailed support@craftcms.com and they sent me a patched file that fixed the issue for now.
Answers.UserDisplayName: Cavell Blood
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-16T20:28:37.220Z
Answers.LastActivityDate: 2015-12-16T20:37:40.973Z
Answers.LastEditDate: 2015-12-16T20:37:40.973Z
Answers.UserDisplayName: Chase Giunta
Body: <p>I'm using the following code but the redirect is not working. After the user registers it takes them back to the home page and not to <code>volunteer/identity</code>. I put a message on the homepage to display if the user is logged in and it appears that they are logged it at that point. This used to work before 2.5 on a different site that I haven't upgraded to 2.5. But now on this new install of 2.5 I can't get it to work.</p>
  
  <p>Has anyone else experienced the same issues?</p>
  
  <pre><code>{% extends "_layout" %}
  
  {% block content %}
  
  &lt;form method="post" accept-charset="UTF-8"&gt;
      {{ getCsrfInput() }}
      &lt;input type="hidden" name="action" value="users/saveUser"&gt;
      &lt;input type="hidden" name="redirect" value="volunteer/identity"&gt;
  
      {% macro errorList(errors) %}
          {% if errors %}
              &lt;ul class="errors"&gt;
                  {% for error in errors %}
                      &lt;li&gt;{{ error }}&lt;/li&gt;
                  {% endfor %}
              &lt;/ul&gt;
          {% endif %}
      {% endmacro %}
  
      {% from _self import errorList %}
  
      &lt;label for="firstName"&gt;First Name&lt;/label&gt;
      &lt;input id="firstName" type="text" name="firstName" {% if account is defined %} value="{{ account.firstName }}"{% endif %}&gt;
  
      {% if entry is defined %}
          {{ errorList(account.getErrors('firstName')) }}
      {% endif %}
  
      &lt;label for="lastName"&gt;Last Name&lt;/label&gt;
      &lt;input id="lastName" type="text" name="lastName" required {% if account is defined %} value="{{ account.lastName }}{% endif %}"&gt;
  
      {% if entry is defined %}
          {{ errorList(account.getErrors('lastName')) }}
      {% endif %}
  
      &lt;label for="email"&gt;Email&lt;/label&gt;
      &lt;input id="email" type="text" name="email"
          {% if account is defined %} value="{{ account.email }}"{% endif %}&gt;
  
      {% if account is defined %}
          {{ errorList(account.getErrors('email')) }}
      {% endif %}
  
      &lt;label for="password"&gt;Password&lt;/label&gt;
      &lt;input id="password" type="password" name="password"&gt;
  
      {% if account is defined %}
          {{ errorList(account.getErrors('password')) }}
      {% endif %}
  
      &lt;button type="submit" class="button"&gt;Save and continue&lt;/button&gt;
  
  &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>My config file looks like this:</p>
  
  <pre><code>return array(
      'devMode' =&gt; true,
      'useEmailAsUsername' =&gt; true,
      'autoLoginAfterAccountActivation' =&gt; true,
      'omitScriptNameInUrls' =&gt; true,
      'setPasswordPath' =&gt; array(
          'en' =&gt; 'account/setpassword'
      ),
  );
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-16T19:50:34.423Z
Comments.Text: So, if it's redirecting to the homepage and they are logged in, you're saying that it also skips the whole activation/email verification process altogether, correct? Anything in `craft/storage/runtime/logs` ?
Comments.UserDisplayName: Chase Giunta
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-16T19:54:11.117Z
Comments.Text: Yes, I've turned off Verify email addresses in `admin/settings/users/settings` so it doesn't verify anything. I'll check the logs now.
Comments.UserDisplayName: Cavell Blood
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-16T20:00:34.317Z
Comments.Text: @ChaseGiunta I checked the logs for `redirect` and I found this
  
      $_POST=array (
        'action' => 'users/saveUser'
        'redirect' => 'volunteer/identity'
        'firstName' => 'qwetr'
        'lastName' => 'erty'
        'email' => 'fdgh@me.com'
        'password' => REDACTED
      )
  
  So it looks like it is getting the correct values.
Comments.UserDisplayName: Cavell Blood
Tags: <redirect><registration><devmode>
Title: User Registration Form Redirect not working Craft 2.5
ThreadText: # User Registration Form Redirect not working Craft 2.5
  
  (Asked by: username_0 on 2015-12-16)
  
  I'm using the following code but the redirect is not working. After the user registers it takes them back to the home page and not to `volunteer/identity`. I put a message on the homepage to display if the user is logged in and it appears that they are logged it at that point. This used to work before 2.5 on a different site that I haven't upgraded to 2.5. But now on this new install of 2.5 I can't get it to work.
  
  Has anyone else experienced the same issues?
  
  ```
  {% extends "_layout" %}
  
  {% block content %}
  
  <form method="post" accept-charset="UTF-8">
      {{ getCsrfInput() }}
      <input type="hidden" name="action" value="users/saveUser">
      <input type="hidden" name="redirect" value="volunteer/identity">
  
      {% macro errorList(errors) %}
          {% if errors %}
              <ul class="errors">
                  {% for error in errors %}
                      <li>{{ error }}</li>
                  {% endfor %}
              </ul>
          {% endif %}
      {% endmacro %}
  
      {% from _self import errorList %}
  
      <label for="firstName">First Name</label>
      <input id="firstName" type="text" name="firstName" {% if account is defined %} value="{{ account.firstName }}"{% endif %}>
  
      {% if entry is defined %}
          {{ errorList(account.getErrors('firstName')) }}
      {% endif %}
  
      <label for="lastName">Last Name</label>
      <input id="lastName" type="text" name="lastName" required {% if account is defined %} value="{{ account.lastName }}{% endif %}">
  
      {% if entry is defined %}
          {{ errorList(account.getErrors('lastName')) }}
      {% endif %}
  
      <label for="email">Email</label>
      <input id="email" type="text" name="email"
          {% if account is defined %} value="{{ account.email }}"{% endif %}>
  
      {% if account is defined %}
          {{ errorList(account.getErrors('email')) }}
      {% endif %}
  
      <label for="password">Password</label>
      <input id="password" type="password" name="password">
  
      {% if account is defined %}
          {{ errorList(account.getErrors('password')) }}
      {% endif %}
  
      <button type="submit" class="button">Save and continue</button>
  
  </form>
  
  {% endblock %}
  
  ```
  
  My config file looks like this:
  
  ```
  return array(
      'devMode' => true,
      'useEmailAsUsername' => true,
      'autoLoginAfterAccountActivation' => true,
      'omitScriptNameInUrls' => true,
      'setPasswordPath' => array(
          'en' => 'account/setpassword'
      ),
  );
  
  ```
  
  **Tags:** redirect, registration, devmode
  
  > **Comments:**
  > **username_1**: So, if it's redirecting to the homepage and they are logged in, you're saying that it also skips the whole activation/email verification process altogether, correct? Anything in `craft/storage/runtime/logs` ?  
  > **username_0**: Yes, I've turned off Verify email addresses in `admin/settings/users/settings` so it doesn't verify anything. I'll check the logs now.  
  > **username_0**: @username_1 I checked the logs for `redirect` and I found this      $_POST=array (       'action' => 'users/saveUser'       'redirect' => 'volunteer/identity'       'firstName' => 'qwetr'       'lastName' => 'erty'       'email' => 'fdgh@me.com'       'password' => REDACTED     )  So it looks like it is getting the correct values.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-01-11. Score: 2 | Accepted answer
  
  For Craft 2.6, if a hidden `redirect` input is set, Craft will now follow it first and fallback to the [activateAccountSuccessPath](https://craftcms.com/docs/config-settings#activateAccountSuccessPath) if it's not available.
  
  > **Comments:**
  > **username_0**: Thanks username_2! When is 2.6 coming out? soonish? Looks like Craft is only at 2.5.2757. Is there something I can do to patch it at the moment?  
  > **username_2**: No ETA on 2.6, but hit up support@craftcms.com for the patched file if you want it. Just keep in mind that an auto-update could overwrite it at anytime, though.  
  > **username_0**: That's true. Ok, I'll send for a patched file. Thanks.  
  > **username_0**: The patched file fixed this problem.  
  
  ---
  
  ### Answer by username_1 on 2015-12-16. Score: 0
  
  This probably isn't the answer you're looking for (it should be honoring your redirect) but if that's the only form being used for registrations, you could set `'activateAccountSuccessPath' => 'volunteer/identity'` in your config file.
  
  > **Comments:**
  > **username_0**: Yes, that's true. It should be honoring the redirect. I can try that for now but I'd rather not hard code this. This should work for now. Thanks!  
  > **username_3**: I have the same issue as OP, and since we work with e-mail address verification, this workaround isn't suitable. It should honor the right settings, indeed.  
  > **username_0**: @username_3: I emailed support@craftcms.com and they sent me a patched file that fixed the issue for now.  
  > **username_3**: @username_0 Thank you for this heads-up. Very helpful. I will mail them too.  
  
  ---
  
  