<p>Check out the <a href="http://buildwithcraft.com/docs/config-settings#autoLoginAfterAccountActivation"><code>autoLoginAfterAccountActivation</code> config setting</a>.</p>

<p>To enable it, set it to true in your <code>craft/config/general.php</code> file:</p>

<pre><code>'autoLoginAfterAccountActivation' =&gt; true
</code></pre>

CC BY-SA 3.0
2015-02-13T15:12:35.063Z
Exactly what I was looking for, thanks Ben.
James
CC BY-SA 3.0
2015-02-13T14:47:06.193Z
2015-02-13T14:47:06.193Z
Ben Parizek
<p>I’m setting up a site that has paid membership. For a visitor to create an account I’ll need to:</p>

<ol>
<li>Ask for email and password and create the new user.</li>
<li>Take payment and upgrade the user’s status/user group if successful.</li>
</ol>

<p>This could be part of the same form, or split into two steps. Either way, I’d like to know if it’s possible to auto log in the user once they’ve hit submit on their registration form.</p>

CC BY-SA 3.0
2015-02-13T12:12:16.110Z
Does this help: ["What's the simplest way of automatically activating/verifying user accounts"](http://craftcms.stackexchange.com/q/7039/125)?
carlcs
CC BY-SA 3.0
2015-02-13T13:00:54.200Z
Sorry, yes I do have that setup. I’ve edited the question to clarify: I’d like to know if it’s possible to auto log in the user once they’ve hit submit on their registration form.
James
<users><registration><login>
Auto log in user
# Auto log in user

(Asked by: username_0 on 2015-02-13)

I’m setting up a site that has paid membership. For a visitor to create an account I’ll need to:

1. Ask for email and password and create the new user.
2. Take payment and upgrade the user’s status/user group if successful.

This could be part of the same form, or split into two steps. Either way, I’d like to know if it’s possible to auto log in the user once they’ve hit submit on their registration form.

**Tags:** users, registration, login
> **Comments:**
> **username_1**: Does this help: ["What's the simplest way of automatically activating/verifying user accounts"](http://craftcms.stackexchange.com/q/7039/125)?  
> **username_0**: Sorry, yes I do have that setup. I’ve edited the question to clarify: I’d like to know if it’s possible to auto log in the user once they’ve hit submit on their registration form.  

---

## 1 answers

### Answer by username_2 on 2015-02-13. Score: 16 | Accepted answer

Check out the autoLoginAfterAccountActivation config setting.
To enable it, set it to true in your craft/config/general.php file:
'autoLoginAfterAccountActivation' => true

> **Comments:**
> **username_0**: Exactly what I was looking for, thanks Ben.  

---

