Auto Login User After Registration
So you want to cut the chase and make the whole process of registration and login as fast as possible? While some want to be judicious with who signs up on their sites, one request we regularly received was for automatically logging in the user after successful registration. So here’s a quick tutorial on how to auto-login a user right after registration form submission.
Obviously, for auto-login to work, you need to turn on user auto-approval. Auto-Approval is administered from Global Settings —> User accounts —> Account Activation Method selector.
Also the form must be a WordPress user registration form. This is controlled from General Settings in the Form Dashboard.
When we are creating a new registration form, user account creation is enabled by default.
Enabling Auto-Login
We’ll use a simple generic form for this demonstration. Auto-login setting is specific to each form. Therefore, we will find it inside Form Dashboard of individual forms in the Accounts settings. It will only appear if the “Also create WP User account?” checkbox is checked. We must also select the role that should be assigned to the registrant after successful form submission. Subscriber is always the safest choice. Or we can create custom roles using RegistrationMagic’s built in User Role Manager. Alternatively, we can also let users pick their role by enabling “Allow Users Choice of Roles” option.
Let’s turn our setting on and check the Force Login after Registration? checkbox.
We’re are all set now. Let’s test it out. To start with, here’s our form. Nothing fancy.
Testing Submission & Auto-Login After Registration
Filling it out now:
Submission successful.
And… the page will now refresh and we are logged in as expected.
This is how anyone can use RegistrationMagic to register users and auto login user after registration successfully. We hope this will be useful for a lot of folks out there. If you feel we are missing something, feel free to give us a shout and maybe you will see it in the next release. Until next time…
- RegistrationMagic Starter Guide - July 21, 2025
- Best 5 Event Calendar plugins for WordPress - April 2, 2025
- WordPress Registration Shortcodes List - July 10, 2024
- WordPress Payment Form Guide: Setup Payments on Registration Form - July 8, 2024
- Experience the Unfolding Magic! - August 4, 2023
- List of Guides for WordPress User Registration Process - July 28, 2023
- Frequently Asked Questions About WordPress User Registration Forms - July 28, 2023
- How to display registration forms on WordPress site? - July 26, 2022
- WordPress User Registration Custom Status Guide - April 9, 2022
- How to add or update user profile fields using WordPress forms - August 5, 2020
Everything works until I attempt to login the user. Please advise.
Hi Derrick,
Could you please create a support ticket from here – https://metagauss.com/technical-support/
Our support team will help you with the issue.
What if someone who is already logged in comes to the registration page. Will the user see the registration form still (which would not make sense, I think), or would he or she be redirected to an account page, for example
Has this been answered somewhere ?
I have the same (presale) question.
User will be able to see and submit registration form while in logged-in state. In logged-in state, email field will display pre-populated with registered user email address, and form will be of contact type. It means on submission while the form data will get saved to database, the account itself won’t be created.