Answers.Body: <p>Craft 2.2 introduced the <a href="http://buildwithcraft.com/docs/config-settings#postLoginRedirect" rel="nofollow">postLoginRedirect</a> config setting which affects not only where users on the front-end of the site get redirected to after logging in (defaults to the home page), but where they get sent if they visit the front-end login page while they are logged in.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-03T22:52:56.577Z
Answers.LastActivityDate: 2014-09-03T22:52:56.577Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>As Brad said the new default behavior is for users to be redirected wherever <a href="http://buildwithcraft.com/docs/config-settings#postLoginRedirect">postLoginRedirect</a> is set to (if a <code>redirect</code> param was not in the POST data).</p>
  
  <p>You can get your old behavior back by adding that hidden <code>redirect</code> param though, set to <a href="http://buildwithcraft.com/docs/templating/craft.request#getPath">craft.request.getPath()</a>:</p>
  
  <pre class="lang-twig prettyprint-override"><code>&lt;input type="hidden" name="redirect" value="{{ craft.request.path }}"&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-18T19:21:32.477Z
Answers.Text: I can't get this to work. I really don't understand.
Answers.UserDisplayName: Tom De Smet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-03T23:58:18.137Z
Answers.LastActivityDate: 2014-09-04T11:18:11.613Z
Answers.LastEditDate: 2014-09-04T11:18:11.613Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>Since updating to Craft 2.2, my front-end login form now redirects to the home page.</p>
  
  <p>The intended behaviour is to just reload the page that the visitor was on when they logged in.</p>
  
  <p>In Craft 2.1 I achieved this by omitting the hidden redirect field. Any idea how to prevent members from being kicked to the home page now?</p>
  
  <p>Thanks!</p>
  
Tags: <redirect>
Title: Login redirects to home page after 2.2 update
ThreadText: # Login redirects to home page after 2.2 update
  
  (Asked by: username_0 on 2014-09-03)
  
  Since updating to Craft 2.2, my front-end login form now redirects to the home page.
  
  The intended behaviour is to just reload the page that the visitor was on when they logged in.
  
  In Craft 2.1 I achieved this by omitting the hidden redirect field. Any idea how to prevent members from being kicked to the home page now?
  
  Thanks!
  
  **Tags:** redirect
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-09-03. Score: 11 | Accepted answer
  
  As username_1 said the new default behavior is for users to be redirected wherever [postLoginRedirect](http://buildwithcraft.com/docs/config-settings#postLoginRedirect) is set to (if a `redirect` param was not in the POST data).
  
  You can get your old behavior back by adding that hidden `redirect` param though, set to [craft.request.getPath()](http://buildwithcraft.com/docs/templating/craft.request#getPath):
  
  ```twig
  <input type="hidden" name="redirect" value="{{ craft.request.path }}">
  
  ```
  
  > **Comments:**
  > **username_3**: I can't get this to work. I really don't understand.  
  
  ---
  
  ### Answer by username_1 on 2014-09-03. Score: 4
  
  Craft 2.2 introduced the [postLoginRedirect](http://buildwithcraft.com/docs/config-settings#postLoginRedirect) config setting which affects not only where users on the front-end of the site get redirected to after logging in (defaults to the home page), but where they get sent if they visit the front-end login page while they are logged in.
  
  
  ---
  
  