This topic contains 6 reply and 2 voices, and was last updated by Sekander Badsha 5 years, 1 month ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
September 10, 2014 at 5:25 am 26568
Sekander Badsha So far the plugin is working well, but I am having trouble getting a newly registered user to be automatically logged in. I have this in my functions.php but doesnt seem to be changing anything
// auto log in a user who has just signed up       
function wpufe_auto_login_new_user( $user_id ) {
    wp_set_current_user( $user_id );
    wp_set_auth_cookie( $user_id, false );
}
add_action( 'user_register', 'wpufe_auto_login_new_user' );
At the moment I have a successful registration redirect to the dashboard, but the user is prompted to login and if the user navigates to other pages it can get stuck in a "please login/you are already logged in" loop. Also the redirect on my registration form also acts as the redirect on the login page. Is there a way to seperate these two? Plugin conflicts does not seem to be the issue here. Thank you
September 11, 2014 at 1:43 pm 26648
Sekander Badsha Sekander Badsha

Hello Jordan,
I have tested your code and it’s working fine. I’m not getting any issues here. You can check if you have set any page to login. If you didn’t set a page for login, please set one. I believe that would solve the redirect issue.

September 11, 2014 at 5:50 pm 26672
Jordan Jordan

I am still having issues.

Once I register I get auto redirected to the dashboard but it says,
“This page is restricted. Please login to view this page.”

September 14, 2014 at 5:11 pm 26775
Sekander Badsha Sekander Badsha

Hello Jordan,
This is not a feature of our add-on. So we can not provide further support regarding this.

September 15, 2014 at 9:09 am 26802
Jordan Jordan

I am not satisfied with the support I have received, and I have viewed other posts in the support forums and it seems that the support team does not try to understand people problems and instead recycle the same excuses “This is not a feature of our addon. So we can not provide further support…”, “You may want to hire a developer” etc.

I’ll try a word my issues in another way..

After successfully registering as a new user you are not logged in. If you are on a restricted page you get an error message “This page is restricted. Please login to view this page.” Why are new users prompted to log in just after registering.

Other people have had the same issue but seem to have solved it by adding this code:

// auto log in a user who has just signed up       
function wpufe_auto_login_new_user( $user_id ) {
    wp_set_current_user( $user_id );
    wp_set_auth_cookie( $user_id, false );
}
add_action( 'user_register', 'wpufe_auto_login_new_user' );

However the function has not made a difference for me.

Does anyone have any ideas on how this can be fixed?

Maybe this should be added into the plugin as it is a basic feature that would save most people a bit of time on searching for fixes.

September 15, 2014 at 3:48 pm 26823
Sekander Badsha Sekander Badsha

Okay. I will forward this idea to the developer team.

September 15, 2014 at 5:50 pm 26835
Sekander Badsha Sekander Badsha

Hello Jordan,
I have talked with @tareq regarding your issue and he asked for your Admin and FTP login credentials. Please do so in a private reply. We will have a look about what is going wrong.

Viewing 6 Posts - 1 through 6 (of 6 total)