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] About logout qsm user

Simple Membership Plugin › Forums › Simple Membership Plugin › About logout qsm user

  • This topic has 0 replies, 1 voice, and was last updated 1 year, 11 months ago by ysdorange.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • September 25, 2024 at 9:52 am #28860
    ysdorange
    Participant

    Hello.

    Thank you for the great plugin.

    I’m thinking of making my own since there is no function to control the number of simultaneous logins.
    After researching, I found out that the WordPress logout process and the Simple Membership logout process are different.
    Specifically, I tried to introduce logout on other devices with the following function. The function was executed, but other devices were not logged out.

    add_action(‘wp_login’, function ($login, $user) {
    // Destroy all user sessions
    $user_sessions = WP_Session_Tokens::get_instance($user->ID);
    $user_sessions->destroy_all();
    // Set login cookie
    wp_set_auth_cookie($user->ID, true);
    }, 10, 2);

    In other words, I think $user_sessions->destroy_all(); does not allow you to log out.
    I tried other logout-related plugins, but couldn’t log out.
    Can you tell me the process for logging out?

  • Author
    Posts
Viewing 1 post (of 1 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