Auto Login After Registration
Author | Posts |
---|---|
May 2, 2013 at 12:58 am 3077 | |
Great Plugin, just wondering if there is away to have a person be automatically logged in after the complete the registration form. I want them to be able to go directly to purchasing a posting package after they register with out having to go through the login step? Thanks Dale | |
May 2, 2013 at 8:45 am 3083 | |
Hmm not sure if it will work with the set up you have or not but I use “remove email verification” from WPMU DEV which does the job for you. It removes the email to verify account and auto logs in users. However, I have not tested it with the front end register form of User Frontend. | |
May 2, 2013 at 9:00 am 3084 | |
[php] This code should work (not tested), place it to your themes functions.php. This will login the user after registration and set the redirect url to your purchase pack page so it gets redirected to the right place. | |
May 6, 2013 at 2:05 pm 3221 | |
This is exactly what i was looking for. Working for me, thanks 🙂 | |
May 7, 2013 at 8:33 pm 3322 | |
Is that SSL function required? Does it require SSL page? I have not found this successful but will keep testing. | |
May 7, 2013 at 8:37 pm 3324 | |
No, you don’t need SSL support or SSL page. It works fine without it. | |
August 14, 2013 at 5:45 pm 6955 | |
Hello, I’m interested in “auto login” too, but i need to redirect users to buddypress profile so they can complete the profile. The problem is that each user have a different url,(http://example.com/members/user_example/profile/edit/group/1/) so i cannot figure out how to do this. Thank you in advance! | |
August 14, 2013 at 11:36 pm 6975 | |
Here is an example of redirecting to buddypress user profile. Appending the group part to that url should do the job. | |
March 18, 2014 at 2:45 pm 16841 | |
Hello. I used a code same as your’s: function auto_login_new_user( $user_id ) { add_action( ‘user_register’, ‘auto_login_new_user’ ); … but I encounter a problem with the autologin. The page is not really reloading. The “Register” button acts with the user creation but doesn’t do the real reload of my page who is a download page. I see at top of my page the “Login” saying in fact I’m not really logged. If I do a CTRL+R at that time, that’s OK. But without refreshing the page, I’m not logged in even after the action execution. I tried the following action to be sure to reload my page: function auto_login_new_user( $user_id ) { add_action( ‘user_register’, ‘auto_login_new_user’ ); … instead of the function using only wp_set_current_user and wp_set_auth_cookie and that new function hangs, as if wp_redirect and exit are not executed. Can you please help me? Thank you in advance! |