| 开发者 |
joelcj91
duckdev foxelabs |
|---|---|
| 更新时间 | 2026年11月9日 04:25 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
WP_Session_Tokens API. It needs no cron jobs, no background polling and no external services, and it works with any theme and host.
Loggedin at a glance
wp loggedin sessions list, wp loggedin sessions destroy, wp loggedin sessions destroy-all and wp loggedin settings.loggedin/v1.Install and activate Loggedin, go to Users → Loggedin → Login limits, set the maximum number of active logins and choose a login logic: Logout Oldest, Logout All or Block New. Save. The limit applies from each user's next login.
Set the limit to 1. With Logout All or Logout Oldest, a second person logging in signs the first one out, so sharing one account becomes annoying fast. With Block New, the second login is refused until the first device signs out. Loggedin works with MemberPress, Paid Memberships Pro, WooCommerce, LearnDash and other plugins that log users in through WordPress.
Go to Users → Loggedin → Auto logout, turn on idle logout and set the timeout in minutes. Users see a countdown before they are signed out, and each role can have its own timeout. It's free and built in since version 3.4.0.
Go to Users → Loggedin → Sessions, enter the user's ID, email or username under Force Logout and click the button. Every session of that user ends immediately. You can also use Sign out everywhere on the user's row on the Users screen, or run wp loggedin sessions destroy <user>.
Click Logout All Users on Users → Loggedin → Sessions, or run wp loggedin sessions destroy-all. It finishes instantly at any number of users because it sets one site-wide cut-off time instead of looping through accounts. Your own session stays signed in.
The Users screen shows each user's number of active sessions and their last login. Each user sees their own devices under Your sessions on their profile. For a live list of everyone signed in right now, with every device, add the Active Sessions add-on.
Yes, with the Limit Per Role add-on. Each role gets its own limit, for example 5 for administrators and 1 for subscribers. A user with several roles gets the highest. To leave administrators out of the limit altogether, turn on Don't limit administrators in the free plugin.
Yes, with the Limit Per User add-on, which adds a limit field to the user's profile.
If self-unlock is on, the error shows a link after the right password. The user gets an email with a link that signs out all their devices, and can then log in. An administrator can also force logout the user from the Sessions page.
Someone logged in to your account on another device, and the site allows only a set number of devices at once, so this one was signed out. If it wasn't you, change your password.
No. Loggedin acts only when someone logs in. Existing sessions stay until they expire, the user logs out or a later login replaces them. Turning on auto logout gives every session the full timeout from the moment you save.
Yes. Any plugin that logs users in through WordPress is covered with no extra setup. Social login, magic-link and popup login plugins are covered under Logout Oldest and Logout All; Block New can refuse them only when the plugin checks first, as Nextend Social Login does. Tested with WooCommerce, Ultimate Member, Nextend Social Login, Magic Login, Two Factor, Limit Login Attempts Reloaded, WPS Hide Login and User Switching. See compatibility.
No. Limit login attempts plugins block repeated wrong passwords to stop brute-force attacks. Loggedin limits how many devices a valid account can be signed in on at the same time. They do different jobs and work well together.
Yes for Logout All, Block New, force logout and log out all users, which go through the standard WP_Session_Tokens API. Logout Oldest and the per-device lists need WordPress's default session storage in user meta.
No. Loggedin does its main work when someone logs in or out, and on its own admin screens. On other pages it only reads its settings and, with auto logout on, the signed-in user's last activity. There's no cron, no polling and no remote request. With auto logout on, a small script tracks activity in the browser and checks in with the server at most once a minute while the page is in use.
Loggedin calls no external services and sends no data anywhere. It uses the session records WordPress already keeps, which hold the IP address and browser of each login, and stores each user's last login time and, with auto logout on, when each session was last active. The profile screen shows only part of the IP address. Mention WordPress sessions in your privacy policy as you would without the plugin.
By default, 14 days with "Remember Me" checked and 2 days without. Change both under Users → Loggedin → Auto logout → Session length, or with the auth_cookie_expiration filter.
Yes, under Users → Loggedin → Lockout & recovery. Developers can also use the loggedin_error_message filter:
php
add_filter( 'loggedin_error_message', function ( $message ) {
return 'Your account is already signed in on another device.';
} );
Yes. wp loggedin sessions lists, counts and ends a user's sessions, and wp loggedin settings reads and changes settings. Commands that end sessions ask for confirmation unless you pass --yes. Run wp help loggedin or see the WP-CLI docs.
COOKIE_DOMAIN to false.loggedin_settings_schema filter.loggedin_sessions_displacing action before Logout All or Logout Oldest ends sessions, and loggedin_uninstalled after the plugin is deleted.loggedin_settings_properties filter, so an add-on's own key in Loggedin's settings is saved, and loggedin_session_device to name the devices in a user's session list.wp loggedin settings set accepts true/false, yes/no, on/off or 1/0 for on/off settings.loggedin_logics can be saved.loggedin_destroy_all_sessions now fires for every way a user is signed out everywhere, including the Users screen, a password change and the unlock email.POST /loggedin/v1/settings accepts every setting, not only the limit and the login mode.wp loggedin sessions list no longer shows leftover sessions on a site that stores sessions elsewhere, such as Redis.loggedin_session_invalidated passes the hashed session token instead of the raw one.loggedin_error_message also passes the user, and loggedin_init passes the Plugin instance.% followed by two characters from 0–9 or a–f, in either case (for example %bB) were shortened before being sent to the licensing server. Affected add-ons could not be activated and so stopped receiving updates.wp loggedin sessions destroy-all — the same site-wide logout from WP-CLI.POST /loggedin/v1/sessions/destroy-all backing the admin button.loggedin_logout_all_users action fired when a site-wide logout is triggered, and loggedin_session_invalidated action fired for each stale session as it is rejected.WP_Session_Tokens API, so it works with any session storage backend.wp loggedin sessions (list, count, destroy) and wp loggedin settings (list, get, set). Run wp help loggedin for the full reference.wp loggedin sessions destroy <user> --token=<hash> signs a user out of a single device instead of all of them.loggedin_cli_init action so add-ons can register their own subcommands under the wp loggedin namespace.loggedin_destroy_session action fired when an individual session is destroyed.duckdev/wp-review-notice library and scoped to the Loggedin settings screen with a 7-day delay.#wpcontent padding.loggedin.admin.tabs JS filter — addons can register their own React component as a tab in the Loggedin admin nav, with optional before / after positioning hints. Powers the new Active Sessions addon.loggedin.settings.force_logout.cross_sell so addons can hide or replace it once installed./loggedin/v1/ for settings, session management and add-on licensing.loggedin_settings option registered with show_in_rest, readable and writable by the React admin and by external integrations through the standard core-data flow.loggedin_register_addon filter and appear in the Add-ons tab.PanelBody to the Settings tab via the loggedin.settings.panels filter.loggedin_init, loggedin_settings_defaults, loggedin_admin_script_vars, loggedin_addons_catalog, loggedin_destroy_oldest_session and more.DuckDev\Loggedin\) and aligned with WordPress Coding Standards.