• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » Security » Security Documentation » Filter Hooks » wpmem_sec_prevent_concurrent_logins

wpmem_sec_prevent_concurrent_logins

Description

Filter to allow certain users to have concurrent sessions when necessary.

Parameters

$prevent
(boolean) Whether or not to prevent concurrent sessions (default: true)

$user_id
(integer) The current user ID

Example

add_filter( 'wpmem_sec_prevent_concurrent_logins', function( $prevent, $user_id ) {

    // If user ID is 1, allow concurrent sessions:
    
    if ( 1 == $user_id ) {
        return false;
    }

    return $prevent;
}, 10, 2 );

Changelog

Introduced in version 1.0

Source

wpmem_sec_prevent_concurrent_logins is located in includes/class-wp-members-security-sessions.php

WP-Members Security

Plugin Info

Current Stable Version: 1.6.3
Minimum WordPress Version: 5.5
Tested up to WordPress Version: 6.8
Last Updated: 2025-05-14

Documentation

    • Setup
    • Options
    • Login Lockout
    • Ban List
    • Filter Hooks
    • Action Hooks
    • Change Log

Get the Plugin

  • Purchase the Plugin
  • Get the Pro Bundle

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy