<p>If the user being registered has access to the control panel, then you'll want to set the <a href="http://buildwithcraft.com/docs/config-settings#postCpLoginRedirect" rel="nofollow noreferrer">postCpLoginRedirect</a> config setting as well.</p>

<p><strong>Update:</strong></p>

<p>Looks like this was a bug and the same problem as <a href="https://craftcms.stackexchange.com/a/4305/57">this one</a>.  Should be fixed for the next release.</p>

<p><strong>Update 2:</strong></p>

<p>Officially fixed in <a href="http://buildwithcraft.com/updates#build2598" rel="nofollow noreferrer">2.2 build 2598</a>.</p>

CC BY-SA 3.0
2014-10-22T00:45:54.050Z
No CP access in the case cited above. I am building out an entire frontend experience for these users.
David A McInnis
CC BY-SA 3.0
2014-10-22T00:50:15.097Z
Ahh... looks like this might be a bug.  Will look into it and update the answer here.
Brad Bell
CC BY-SA 3.0
2014-10-22T05:29:57.437Z
So, am I correct in assuming that the error is in 'postLoginRedirect' => '/actions/gistClient/loginControl'? I added a redirect to the login form and that works. It does not solve my problem but as a hidden input field the redirect  works.
David A McInnis
CC BY-SA 3.0
2014-10-22T22:08:11.077Z
Updated the answer.
Brad Bell
CC BY-SA 3.0
2014-11-13T08:10:50.033Z
Is this broken again. I tested this today and after login, was redirected to the homepage. My config settings are the same as above. When I log in through the login form, I am correctly redirected to loginControl. The problem seems to be in chaining autoLoginAfterAccountActivation and postLoginRedirect
David A McInnis
CC BY-SA 3.0
2014-10-22T00:28:02.723Z
2014-10-31T01:22:25.470Z
2017-04-13T12:51:00.253Z
Brad Bell
<p>Can these things work together? Right now, after verification I am being redirected to the dashboard (/gistApp) instead of being routed through /actions/gistClient/loginControl where I have some user business logic. I know that /actions/gistClient/loginControl works because I can direct navigate to that URL.</p>

<p>Here is my general.php</p>

<pre><code>return array(
 'omitScriptNameInUrls' =&gt; true,
  'loginPath' =&gt; '/gistapp/login',
  'setPasswordSuccessPath' =&gt; '/gistapp/login' ,
  'purgePendingUsersDuration' =&gt; 'P2M',
  'devMode' =&gt; true,
  'autoLoginAfterAccountActivation' =&gt; true,
  'postLoginRedirect' =&gt; '/actions/gistClient/loginControl',
  'enableCsrfProtection' =&gt; true,
  'csrfTokenName' =&gt; 'cranberryCsrfToken',
);
</code></pre>

CC BY-SA 3.0
2014-11-30T04:40:29.357Z
Per Brad's answer, this was a bug and has been fixed. Since this question no longer has any historical value, it will be closed as a "bug report".
Lindsey D
<config><frontend>
autoLoginAfterAccountActivation and postLoginRedirect
# autoLoginAfterAccountActivation and postLoginRedirect

(Asked by: username_0 on 2014-10-22)

Can these things work together? Right now, after verification I am being redirected to the dashboard (/gistApp) instead of being routed through /actions/gistClient/loginControl where I have some user business logic. I know that /actions/gistClient/loginControl works because I can direct navigate to that URL.
Here is my general.php
return array(
 'omitScriptNameInUrls' => true,
  'loginPath' => '/gistapp/login',
  'setPasswordSuccessPath' => '/gistapp/login' ,
  'purgePendingUsersDuration' => 'P2M',
  'devMode' => true,
  'autoLoginAfterAccountActivation' => true,
  'postLoginRedirect' => '/actions/gistClient/loginControl',
  'enableCsrfProtection' => true,
  'csrfTokenName' => 'cranberryCsrfToken',
);

**Tags:** config, frontend
> **Comments:**
> **username_1**: Per Brad's answer, this was a bug and has been fixed. Since this question no longer has any historical value, it will be closed as a "bug report".  

---

## 1 answers

### Answer by username_2 on 2014-10-22. Score: 0

If the user being registered has access to the control panel, then you'll want to set the [postCpLoginRedirect](http://buildwithcraft.com/docs/config-settings#postCpLoginRedirect) config setting as well.

**Update:**

Looks like this was a bug and the same problem as [this one](https://craftcms.stackexchange.com/a/4305/57). Should be fixed for the next release.

**Update 2:**

Officially fixed in [2.2 build 2598](http://buildwithcraft.com/updates#build2598).

> **Comments:**
> **username_0**: No CP access in the case cited above. I am building out an entire frontend experience for these users.  
> **username_2**: Ahh... looks like this might be a bug.  Will look into it and update the answer here.  
> **username_0**: So, am I correct in assuming that the error is in 'postLoginRedirect' => '/actions/gistClient/loginControl'? I added a redirect to the login form and that works. It does not solve my problem but as a hidden input field the redirect  works.  
> **username_2**: Updated the answer.  
> **username_0**: Is this broken again. I tested this today and after login, was redirected to the homepage. My config settings are the same as above. When I log in through the login form, I am correctly redirected to loginControl. The problem seems to be in chaining autoLoginAfterAccountActivation and postLoginRedirect  

---

