{"id":49421,"date":"2016-07-01T22:56:15","date_gmt":"2016-07-01T22:56:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/loggedin\/"},"modified":"2026-01-02T06:30:57","modified_gmt":"2026-01-02T06:30:57","slug":"loggedin","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/loggedin\/","author":13607416,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.4","stable_tag":"2.0.4","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Loggedin - Limit Concurrent Sessions","header_author":"Joel James","header_description":"","assets_banners_color":"1e1a1a","last_updated":"2026-01-02 06:30:57","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/JoelCJ","header_plugin_uri":"https:\/\/duckdev.com\/products\/loggedin-limit-active-logins\/","header_author_uri":"https:\/\/duckdev.com\/","rating":4.9,"author_block_rating":0,"active_installs":8000,"downloads":116966,"num_ratings":110,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"joelcj91","date":"2019-04-16 07:34:12"},"1.1.0":{"tag":"1.1.0","author":"joelcj91","date":"2019-06-06 07:34:21"},"1.2.0":{"tag":"1.2.0","author":"joelcj91","date":"2020-08-01 05:50:05"},"1.3.0":{"tag":"1.3.0","author":"joelcj91","date":"2020-09-06 02:25:09"},"1.3.1":{"tag":"1.3.1","author":"joelcj91","date":"2023-10-25 05:35:12"},"1.3.2":{"tag":"1.3.2","author":"joelcj91","date":"2025-08-21 18:42:36"},"2.0":{"tag":"2.0","author":"joelcj91","date":"2025-11-10 10:34:47"},"2.0.1":{"tag":"2.0.1","author":"joelcj91","date":"2025-11-10 20:12:48"},"2.0.2":{"tag":"2.0.2","author":"joelcj91","date":"2025-12-09 13:27:35"},"2.0.3":{"tag":"2.0.3","author":"joelcj91","date":"2025-12-09 13:41:23"},"2.0.4":{"tag":"2.0.4","author":"joelcj91","date":"2026-01-02 06:30:57"}},"upgrade_notice":{"2.0.4 (02\/01\/2026)":"<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Review notice check.<\/li>\n<\/ul>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Invalid nonce action prevents notices from being dismissed.<\/li>\n<\/ul>"},"ratings":{"1":1,"2":2,"3":0,"4":2,"5":105},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3348320,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3348323,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3348323,"resolution":"772x250","location":"assets","locale":""},"banner.svg":{"filename":"banner.svg","revision":3348320,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3430884,"resolution":false,"location":"assets","locale":"","contents":"{\"landingPage\":\"\\\/wp-admin\\\/users.php?page=loggedin\",\"preferredVersions\":{\"php\":\"7.4\",\"wp\":\"6.0\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"loggedin\"},\"options\":{\"activate\":true}}]}"}},"all_blocks":[],"tagged_versions":["1.0.1","1.1.0","1.2.0","1.3.0","1.3.1","1.3.2","2.0","2.0.1","2.0.2","2.0.3","2.0.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3392851,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3392851,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"<strong>Settings<\/strong>","2":"<strong>Manage Sessions<\/strong>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1934,602,4233,30471,13749],"plugin_category":[34,38,58],"plugin_contributors":[126295,78159],"plugin_business_model":[],"class_list":["post-49421","plugin","type-plugin","status-publish","hentry","plugin_tags-limit","plugin_tags-login","plugin_tags-logout","plugin_tags-sessions","plugin_tags-user-login","plugin_category-accessibility","plugin_category-authentication","plugin_category-user-management","plugin_contributors-duckdev","plugin_contributors-joelcj91","plugin_committers-duckdev","plugin_committers-joelcj91"],"banners":{"banner":"https:\/\/ps.w.org\/loggedin\/assets\/banner-772x250.png?rev=3348323","banner_2x":"https:\/\/ps.w.org\/loggedin\/assets\/banner-1544x500.png?rev=3348323","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/loggedin\/assets\/icon.svg?rev=3348320","icon":"https:\/\/ps.w.org\/loggedin\/assets\/icon.svg?rev=3348320","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/loggedin\/assets\/screenshot-1.png?rev=3392851","caption":"<strong>Settings<\/strong>"},{"src":"https:\/\/ps.w.org\/loggedin\/assets\/screenshot-2.png?rev=3392851","caption":"<strong>Manage Sessions<\/strong>"}],"raw_content":"<!--section=description-->\n<p>Loggedin is a lightweight WordPress plugin that lets you easily limit the number of simultaneous active sessions a user can have. This is a crucial feature for membership sites, online courses, and other platforms where you need to prevent users from sharing their accounts.<\/p>\n\n<h3>\ud83c\udf81 Features<\/h3>\n\n<ul>\n<li><strong>Set Global Limits<\/strong>: Define a maximum number of concurrent logins for all users.<\/li>\n<li><strong>Flexible Login Behavior<\/strong>: Choose to either block new logins when the limit is reached or automatically log out the oldest session to allow a new one.<\/li>\n<li><strong>Prevent Account Sharing<\/strong>: By limiting sessions, you can effectively stop users from sharing their login credentials with others.<\/li>\n<li><strong>Admin Control<\/strong>: Easily force log out a user from the admin dashboard, giving you full control over active sessions.<\/li>\n<li><strong>Developer-Friendly<\/strong>: The plugin is built with a hook-based architecture, making it highly customizable and extensible for developers.<\/li>\n<\/ul>\n\n<h3>\ud83d\udce6 Addons<\/h3>\n\n<p>Enhance LoggedIn's functionality with these simple yet powerful <a href=\"https:\/\/duckdev.com\/addons\/loggedin\/\">add-ons<\/a>.<\/p>\n\n<ul>\n<li><p><strong><a href=\"https:\/\/duckdev.com\/addon\/limit-per-user\/\">Limit Per User<\/a><\/strong>: For more granular control, the Limit Per User addon allows you to set specific login limits for individual users, overriding the global settings. This is perfect for offering different tiers of access or special privileges.<\/p><\/li>\n<li><p><strong><a href=\"https:\/\/duckdev.com\/addon\/real-time-logout\/\">Real-time Logout<\/a><\/strong>: This add-on ensures a truly seamless experience by checking for logouts in real time. When a user's session is terminated in the background due to a login limit, the add-on will automatically refresh their page, instantly restricting access.<\/p><\/li>\n<\/ul>\n\n<h3>\ud83d\udc1b Bug Reports<\/h3>\n\n<p>Found a bug? We welcome your bug reports! Please report any issues directly on the <a href=\"https:\/\/github.com\/Joel-James\/loggedin\/issues\">Loggedin GitHub repository<\/a>.<\/p>\n\n<p><em>Please note: GitHub is for bug reports and development-related issues only. For support, please use the WordPress.org support forums.<\/em><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install Loggedin either via the WordPress.org plugin repository or by uploading the files to your server. (See instructions on <a href=\"https:\/\/docs.duckdev.com\/general\/installing-plugin\">how to install Loggedin<\/a>)<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to <em>Users &gt; Loggedin<\/em> to configure it.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='where%20can%20i%20find%20the%20settings%20for%20loggedin%3F'><h3>Where can I find the settings for Loggedin?<\/h3><\/dt>\n<dd><p>You can find the plugin settings by navigating to <strong>Users &gt; Loggedin<\/strong> in your WordPress admin dashboard.<\/p><\/dd>\n<dt id='what%20are%20the%20available%20login%20logic%20options%3F'><h3>What are the available login logic options?<\/h3><\/dt>\n<dd><p>Currently, the plugin offers three built-in login logic options:<\/p>\n\n<ul>\n<li><strong>Logout Oldest<\/strong>: When a user reaches the login limit, their oldest active session will be automatically terminated to allow for the new login.<\/li>\n<li><strong>Logout All<\/strong>: All other active sessions for the user will be logged out when a new session is started.<\/li>\n<li><strong>Block New<\/strong>: The new login attempt will be blocked if the user has already reached the maximum number of active sessions.<\/li>\n<\/ul>\n\n<p>Additional logic options can be added using third-party plugins or custom code. For more details, <a href=\"https:\/\/docs.duckdev.com\/loggedin\/general-settings#login-logic\">see our documentation here<\/a>.<\/p><\/dd>\n<dt id='how%20long%20does%20a%20login%20session%20last%3F'><h3>How long does a login session last?<\/h3><\/dt>\n<dd><p>The duration of a login session is determined by WordPress's default settings.<\/p>\n\n<ul>\n<li>If the \"Remember Me\" box is checked during login, the session will last for 14 days.<\/li>\n<li>If the \"Remember Me\" box is not checked, the session will last for 2 days.<\/li>\n<\/ul>\n\n<p>You can customize this duration using the <code>auth_cookie_expiration<\/code> filter. Here's an example of how to set the session to one month:<\/p>\n\n<pre>\nfunction custom_auth_cookie_expiration( $expire ) {\n    return MONTH_IN_SECONDS; \/\/ Sets the session to one month\n}\n\nadd_filter( 'auth_cookie_expiration', 'custom_auth_cookie_expiration' );\n<\/pre><\/dd>\n<dt id='what%20if%20a%20user%20has%20reached%20the%20login%20limit%20but%20doesn%27t%20know%20which%20devices%20are%20active%3F'><h3>What if a user has reached the login limit but doesn't know which devices are active?<\/h3><\/dt>\n<dd><p>Administrators can forcefully log a user out of all their active sessions from the dashboard.<\/p>\n\n<ol>\n<li>Find the user's WordPress ID.<\/li>\n<li>Go to <strong>Users &gt; Loggedin<\/strong> in your WordPress admin panel.<\/li>\n<li>Navigate to the <strong>Manage Sessions<\/strong> section.<\/li>\n<li>Enter the user ID and click the <strong>Force Logout<\/strong> button to end all of their active sessions.<\/li>\n<\/ol><\/dd>\n<dt id='can%20i%20bypass%20the%20login%20limit%20for%20specific%20users%20or%20roles%3F'><h3>Can I bypass the login limit for specific users or roles?<\/h3><\/dt>\n<dd><p>Yes, you can bypass the limit for certain users or roles by adding a few lines of code to your theme's <code>functions.php<\/code> file or a custom plugin.<\/p>\n\n<p>To bypass specific user IDs, use the following code:<\/p>\n\n<pre>\nfunction loggedin_bypass_users( $bypass, $user_id ) {\n    \/\/ Add the user IDs you want to bypass to this array.\n    $allowed_users = array( 1, 2, 3, 4, 5 );\n    return in_array( $user_id, $allowed_users );\n}\n\nadd_filter( 'loggedin_bypass', 'loggedin_bypass_users', 10, 2 );\n<\/pre>\n\n<p>To bypass specific user roles, use this code:<\/p>\n\n<pre>\nfunction loggedin_bypass_roles( $prevent, $user_id ) {\n    \/\/ Add the roles you want to bypass to this array.\n    $allowed_roles = array( 'administrator', 'editor' );\n    $user = get_user_by( 'id', $user_id );\n    $roles = ! empty( $user-&gt;roles ) ? $user-&gt;roles : array();\n    return ! empty( array_intersect( $roles, $allowed_roles ) );\n}\n\nadd_filter( 'loggedin_bypass', 'loggedin_bypass_roles', 10, 2 );\n<\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.4 (02\/01\/2026)<\/h4>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Review notice check.<\/li>\n<\/ul>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Invalid nonce action prevents notices from being dismissed.<\/li>\n<\/ul>\n\n<h4>2.0.3 (09\/12\/2025)<\/h4>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Remove debug code.<\/li>\n<\/ul>\n\n<h4>2.0.2 (11\/11\/2025)<\/h4>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Nonce verification for Force Logout.<\/li>\n<li>Uninstall cleanup.<\/li>\n<\/ul>\n\n<h4>2.0.1 (11\/11\/2025)<\/h4>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Fatal errors.<\/li>\n<li>Empty addons page.<\/li>\n<\/ul>\n\n<h4>2.0.0 (10\/11\/2025)<\/h4>\n\n<p><strong>\ud83d\udce6 New<\/strong><\/p>\n\n<ul>\n<li>Settings page<\/li>\n<li>Addons<\/li>\n<li>Logout Oldest logic - Thanks <a href=\"https:\/\/github.com\/Joel-James\/loggedin\/pull\/19\">#19<\/a>.<\/li>\n<\/ul>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Coding standards.<\/li>\n<li>Sanitization.<\/li>\n<\/ul>\n\n<h4>1.3.2 (01\/10\/2024)<\/h4>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Security fixes.<\/li>\n<\/ul>\n\n<h4>1.3.1 (19\/09\/2020)<\/h4>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Support ajax logins - Thanks <a href=\"https:\/\/github.com\/cfaria\">Carlos Faria<\/a>.<\/li>\n<\/ul>\n\n<h4>1.3.0 (28\/08\/2020)<\/h4>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Improved \"Allow\" logic to check only after password check.<\/li>\n<\/ul>\n\n<h4>1.2.0 (07\/06\/2019)<\/h4>\n\n<p><strong>\ud83d\udce6 New<\/strong><\/p>\n\n<ul>\n<li>Added ability to choose login logic.<\/li>\n<\/ul>\n\n<h4>1.1.0 (06\/06\/2019)<\/h4>\n\n<p><strong>\ud83d\udce6 New<\/strong><\/p>\n\n<ul>\n<li>Added ability to force logout users.<\/li>\n<li>Added cleanup on plugin uninstall.<\/li>\n<li>Added review notice.<\/li>\n<\/ul>\n\n<p><strong>\ud83d\udc4c Improvements<\/strong><\/p>\n\n<ul>\n<li>Code improvement<\/li>\n<\/ul>\n\n<h4>1.0.1 (02\/07\/2016)<\/h4>\n\n<p><strong>\ud83d\udc1b Bug Fixes<\/strong><\/p>\n\n<ul>\n<li>Fixing misspelled variable.<\/li>\n<\/ul>\n\n<h4>1.0.0 (16\/06\/2016)<\/h4>\n\n<p><strong>\ud83d\udce6 New<\/strong><\/p>\n\n<ul>\n<li>Initial version release.<\/li>\n<\/ul>","raw_excerpt":"Lightweight plugin that limits an account to a specific number of concurrent logins.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/49421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=49421"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/joelcj91"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=49421"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=49421"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=49421"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=49421"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=49421"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=49421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}