Skip to content
WordPress.org
  • Showcase
  • Plugins
  • Themes
  • Hosting
  • News
    • Learn WordPress
    • Documentation
    • Education
    • Forums
    • Developers
    • Blocks
    • Patterns
    • Photos
    • Openverse ↗︎
    • WordPress.tv ↗︎
    • About WordPress
    • Make WordPress
    • Events
    • Five for the Future
    • Enterprise
    • Gutenberg ↗︎
    • Job Board ↗︎
  • Swag ↗︎
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

LoginLens – Account Sharing Detector

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

LoginLens – Account Sharing Detector

By eyargilad
Download
  • Details
  • Reviews
  • Installation
  • Development
Support

Description

Most anti-sharing plugins just cap concurrent logins. That stops sharing, but it also kicks out the member who reads on their phone and their laptop.

LoginLens takes the other approach: it watches and reports so you can decide what to do. It never blocks a login.

What it detects

  • Simultaneous use: different devices actively using the same account within the same 15 minutes. This is the strongest sign of sharing.
  • Too many devices: many different browser, OS and device combinations in a short window.
  • Too many networks: logins from many different networks, for example several cities in one day.
  • Shared login cookies: an existing session suddenly appearing from another network.

What you get

  • Users → Account Sharing: flagged accounts, ranked most suspicious first, with the reason for each flag.
  • A page for each account showing open sessions right now (with which ones are live), its devices, and the full event log.
  • Country of each login when your site is behind Cloudflare (read from the CF-IPCountry header, so no lookups and no external calls). Tor exit nodes are labelled.
  • Clickable IPs: open a lookup page for any IP in one click.
  • A one-click “Log out of all devices” button.
  • Optional email alerts, sent at most once per account per window.
  • Thresholds you can adjust, plus roles to exclude (administrators are excluded by default).

Works with any login form. It hooks into WordPress core logins and sessions, so it works with wp-login.php, Elementor login forms, WooCommerce, MemberPress, LearnDash, Paid Memberships Pro and others.

Lightweight. Each session’s “last seen” time is updated at most once every 5 minutes. Ordinary page loads add no database writes.

Privacy-friendly. No external services, no tracking and no fingerprinting. Devices are recorded only at a “Chrome on Windows” level. Logs are deleted automatically after a retention period you choose (90 days by default). The data is included in WordPress’s Export and Erase Personal Data tools, and a privacy-policy paragraph is suggested for you under Settings → Privacy.

Screenshots

Flagged accounts, most suspicious first, with the reason for each flag.
Flagged accounts, most suspicious first, with the reason for each flag.
An account's page: why it's flagged, open sessions (live ones in red), and one-click "Log out of all devices".
An account’s page: why it’s flagged, open sessions (live ones in red), and one-click “Log out of all devices”.
The event log: every login, simultaneous use and network change, with country (via Cloudflare), Tor detection and clickable IPs.
The event log: every login, simultaneous use and network change, with country (via Cloudflare), Tor detection and clickable IPs.
Settings: thresholds, email alerts, excluded roles and the proxy/CDN IP source.
Settings: thresholds, email alerts, excluded roles and the proxy/CDN IP source.

Installation

  1. Install and activate the plugin.
  2. Go to Users → Account Sharing → Settings and review the thresholds.
  3. If your site is behind Cloudflare or a reverse proxy, set Client IP source. Otherwise every visitor will appear to share one IP.
  4. Check Users → Account Sharing after your members have been active for a day or so.

FAQ

Will it log out or block my members?

No. It only records and reports. You can end a member’s sessions manually from their account page.

Won’t someone with a phone and a laptop be flagged?

Not with the default settings. An account is flagged at 3 or more devices active at the same time, 4 or more distinct devices, or 5 or more networks within 24 hours. All three thresholds can be changed.

Every user shows the same IP address.

Your site is behind a proxy or CDN. Choose the matching header in Settings → Client IP source.

Why don’t I see a Country column?

Country comes from Cloudflare’s CF-IPCountry header, so it only appears when your site is behind Cloudflare, and only for events recorded after that. You can also supply countries from your own GeoIP source with the loginlens_client_country filter.

Does clicking an IP send data anywhere?

Only if you click it. The link opens ipinfo.io in a new tab, from your own browser. The plugin never contacts it. Use the loginlens_ip_lookup_url filter to choose another service, or return an empty string to turn the links off.

Does it work on multisite?

Yes. Each site keeps its own log.

Developers: are there hooks?

  • loginlens_client_ip (filter): override the detected IP.
  • loginlens_is_user_excluded (filter): exclude specific users.
  • loginlens_event_recorded (action): runs after each event, with the user ID, event type and number of live devices.
  • loginlens_client_country (filter): set a two-letter country code from your own GeoIP source.
  • loginlens_ip_lookup_url (filter): the IP lookup URL pattern, where %s is the IP. Return an empty string to turn the links off.
  • loginlens_waitlist_url (filter): the URL of the early-access link (empty hides it).

Reviews

There are no reviews for this plugin.

Contributors & Developers

“LoginLens – Account Sharing Detector” is open source software. The following people have contributed to this plugin.

Contributors
  • eyargilad

Translate “LoginLens – Account Sharing Detector” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial release.

Meta

  • Version 1.0.0
  • Last updated 2 days ago
  • Active installations Fewer than 10
  • WordPress version 6.2 or higher
  • Tested up to 7.1.5
  • PHP version 7.4 or higher
  • Tags
    account-sharingconcurrent loginslogin logmembership
  • Advanced View

Ratings

No reviews have been submitted yet.

Your review

See all reviews

Contributors

  • eyargilad

Support

Got something to say? Need help?

View support forum

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • Visit our X (formerly Twitter) account
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
Code is Poetry