<p>(Not necessarily a great answer to your question, but it's in the same wheelhouse and might be handy if you're working in this area)!</p>

<p>I remember having issues with this myself (to be honest the precise details are a bit lost in time for me - but basically IIRC it's by design that they're not logged in after creation, perhaps to force them to practise login/their password?  I can't remember but do remember I found it odd behavour) - anyway in my case the issues arose as part of adding user registration during commerce checkout.  It was discussed on Slack and the solution was that Steve Rowling made a very handy plugin to auto-login newly created users:
<a href="https://github.com/steverowling/autologin" rel="nofollow">https://github.com/steverowling/autologin</a></p>

<p>I'm using it, works a treat.</p>

<p>(I should also wrap up my code for registration during checkout as a plugin and release that one of these days!)</p>

CC BY-SA 3.0
2016-09-02T13:02:01.163Z
Okay, so further to this have been able to login with Steve Rowling's excellent plugin. However can't seem to specify where a user is directed to on login. For example via the `postLoginRedirect` or `activateAccountSuccessPath` config. Any suggestions appreciated!
Cole Henley
CC BY-SA 3.0
2016-09-03T02:38:00.750Z
hmmm I think `activateAccountSuccessPath` should work to be honest - what does your config look like - when we have new users register, they definitely go to their dashboard, so it's working here (this is for new user registration right?)
Jeremy Daalder
CC BY-SA 3.0
2016-09-05T08:20:16.267Z
Hey Jeremy - the setting is `'activateAccountSuccessPath' => 'account',` but (new) user registrations are still being sent to the site root. Ta
Cole Henley
CC BY-SA 3.0
2016-09-02T10:28:13.467Z
2016-09-02T10:28:13.467Z
Jeremy Daalder
<p>Add <code>'autoLoginAfterAccountActivation' =&gt; true</code> to config/general.php</p>
<p>Link: <a href="https://craftcms.com/docs/3.x/config/config-settings.html#autologinafteraccountactivation" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/config/config-settings.html#autologinafteraccountactivation</a></p>

CC BY-SA 4.0
2019-10-03T02:12:08.000Z
2021-05-04T23:20:12.557Z
2021-05-04T23:20:12.557Z
Jessica Talzor
<p>Anybody got any suggestions on debugging <code>autoLoginAfterAccountActivation</code> and <code>activateAccountSuccessPath</code> not working? </p>

<p>These are set in <code>general.php</code> of my config but when a user activates their account (sets their password) they are redirected to the homepage and not logged in. The user is showing as active in the control panel.</p>

<p>Hayelp!</p>

<p><a href="http://www.cartoonscrapbook.com/01pics-L/penelope-pitstop_L20.jpg" rel="nofollow noreferrer">Hayelp! http://www.cartoonscrapbook.com/01pics-L/penelope-pitstop_L20.jpg</a></p>

<config><login><registration><activation>
Auto-login on account activation
# Auto-login on account activation

(Asked by: username_0 on 2016-09-02)

Anybody got any suggestions on debugging `autoLoginAfterAccountActivation` and `activateAccountSuccessPath` not working?

These are set in `general.php` of my config but when a user activates their account (sets their password) they are redirected to the homepage and not logged in. The user is showing as active in the control panel.

Hayelp!

[Hayelp! http://www.cartoonscrapbook.com/01pics-L/penelope-pitstop\_L20.jpg](http://www.cartoonscrapbook.com/01pics-L/penelope-pitstop_L20.jpg)

**Tags:** config, login, registration, activation


---

## 2 answers

### Answer by username_1 on 2016-09-02. Score: 3 | Accepted answer

(Not necessarily a great answer to your question, but it's in the same wheelhouse and might be handy if you're working in this area)!

I remember having issues with this myself (to be honest the precise details are a bit lost in time for me - but basically IIRC it's by design that they're not logged in after creation, perhaps to force them to practise login/their password? I can't remember but do remember I found it odd behavour) - anyway in my case the issues arose as part of adding user registration during commerce checkout. It was discussed on Slack and the solution was that Steve Rowling made a very handy plugin to auto-login newly created users:
<https://github.com/steverowling/autologin>

I'm using it, works a treat.

(I should also wrap up my code for registration during checkout as a plugin and release that one of these days!)

> **Comments:**
> **username_0**: Okay, so further to this have been able to login with Steve Rowling's excellent plugin. However can't seem to specify where a user is directed to on login. For example via the `postLoginRedirect` or `activateAccountSuccessPath` config. Any suggestions appreciated!  
> **username_1**: hmmm I think `activateAccountSuccessPath` should work to be honest - what does your config look like - when we have new users register, they definitely go to their dashboard, so it's working here (this is for new user registration right?)  
> **username_0**: Hey Jeremy - the setting is `'activateAccountSuccessPath' => 'account',` but (new) user registrations are still being sent to the site root. Ta  

---

### Answer by username_2 on 2019-10-03. Score: 2

Add `'autoLoginAfterAccountActivation' => true` to config/general.php

Link: <https://craftcms.com/docs/3.x/config/config-settings.html#autologinafteraccountactivation>


---

