Plugin / Loggedin – Limit Active Logins

Joel James

Frequently Asked Questions (FAQ)

This plugin does not have a seperate settings page. But we have one configural settings to let you set the login limit. Go to Settings page in admin dashboard. Scroll down to see the section 🔐 Loggedin. Set the maximum number of active logins a user can have in Maximum Active Logins option.
You can forcefully logout the user from other devices and allow new login. Go to Settings page in admin dashboard. Scroll down to see the section 🔐 Loggedin. Select the Login Logic as Allow.
You block the new logins when the user is logged in from maximum no. of devices according to the limit you set. Go to Settings page in admin dashboard. Scroll down to see the section 🔐 Loggedin. Select the Login Logic as Block. Now user will have to wait for the other login sessions to expire before login from new device.
That depends. If the “Remember Me” box is checked while login, WordPress will keep the user logged in for 14 days by default. If “Remember Me” is not checked, 2 days will be the active login session time. You can change that period using, auth_cookie_expiration filter. function loggedin_auth_cookie_expiration( $expire ) { // Allow for a month. return MONTH_IN_SECONDS; } add_filter( 'auth_cookie_expiration', 'loggedin_auth_cookie_expiration' );
You can forcefully logout a user from all the devices he has logged into. Get his WordPress user ID and, Go to Settings page in admin dashboard. Scroll down to see the section 🔐 Loggedin. Enter user ID of the user you would like to logout. Click Force Logout.
Yes, of course. But this time you are going to add few lines of code. Don’t worry. Just copy+paste this code in your theme’s functions.php file or in custom plugin: function loggedin_bypass_users( $bypass, $user_id ) { // Enter the user IDs to bypass. $allowed_users = array( 1, 2, 3, 4, 5 ); return in_array( $user_id, $allowed_users ); } add_filter( 'loggedin_bypass', 'loggedin_bypass_users', 10, 2 ); Or if you want to bypass this for certain roles: function loggedin_bypass_roles( $prevent, $user_id ) { // Array of roles to bypass. $allowed_roles = array( 'administrator', 'editor' ); $user = get_user_by( 'id', $user_id ); $roles = ! empty( $user->roles ) ? $user->roles : array(); return ! empty( array_intersect( $roles, $whitelist ) ); } add_filter( 'loggedin_bypass', 'loggedin_bypass_roles', 10, 2 );

Ratings

4.6
9 reviews

Rating breakdown

Details Information

Version

1.2.0

First Released

15 Jun, 2016

Total Downloads

4,780

Wordpress Version

4.0 or higher

Tested up to:

5.3

Require PHP Version:

5.6 or higher

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.