Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] Automatically logging in

Simple Membership Plugin › Forums › Simple Membership Plugin › Automatically logging in

Tagged: login

  • This topic has 7 replies, 3 voices, and was last updated 8 years, 3 months ago by mbrsolution.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • January 26, 2018 at 8:32 am #13129
    vandenbusken
    Participant

    I’m automatically logging in users visiting from certain IP ranges. For some reason this doesn’t seem to be working in conjunction with Simple Membership. Users are logged in to WordPress but when trying to view protected content they still have to login.

    I’m using the following functions to login:
    wp_set_current_user($user_id, $loginusername);
    wp_set_auth_cookie($user_id);
    do_action(‘wp_login’, $loginusername);

    Anyone know why this isn’t working?

    January 27, 2018 at 5:41 am #13139
    mbrsolution
    Moderator

    Hi, are you also importing your WP Users into Simple Membership members area?

    January 29, 2018 at 12:48 pm #13158
    vandenbusken
    Participant

    I’ve created a new WP user. When creating a new user it automatically adds it to Simple Memberships members and vice versa. I’ve activated this new user.
    I still have to login to view protected content. I don’t know why because the auto login function is being executed when visiting the site.

    January 29, 2018 at 10:07 pm #13160
    mbrsolution
    Moderator

    Hi, the way the plugin works is like this.

    If you add a WP user and you want this user to also be added to Simple Membership plugin you need to import the user into Simple Membership plugin. This works very well and without any issues. This is the best way to achieve what you are trying to achieve.

    Kind regards

    January 30, 2018 at 4:04 pm #13169
    vandenbusken
    Participant

    Thank you for your reply.

    I’m not seeing an import option but I don’t believe that is necessary. The user account I’m testing this out with is listed on the members overview page in the Simple Membership plugin. I can manually login and view protected content. The only thing that doesn’t work is automatically logging in using the functions I mentioned previously.

    January 30, 2018 at 10:01 pm #13170
    mbrsolution
    Moderator

    Hi, unfortunately I am not a developer. However looking at your function, I don’t see any reference to Simple Membership plugin. Have a look at the following tweaks. They might help you with your function.

    Kind regards

    February 20, 2018 at 7:00 am #13429
    vinaysamant
    Participant

    Is there a way i can add every new WP user to SMP automatically as soon as they register?

    February 21, 2018 at 7:06 am #13446
    mbrsolution
    Moderator

    Hi @vinaysamant, can you start a new support thread please. It allows us to better manage each question.

    Thank you

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy