WordPress plugin that allows admin to force logout all users

Overview

User Login Control

User Login Control is a WordPress plugin allows you to logout user(s) from their account or to see the last activity of your offline users. You can also lock login availability so that no one can login other than your chosen role (administrator i.e) and to have a custom message for those unable to login.

You can customize offline time as well for those users that were not active for the marked duration. If they are not active during the marked duration they will be logged out automatically. One additional feature is that you can manage user sessions and destroy other sessions when the user logs in with a new browser or device.

Hooks

User Login Control provides actions and filters to help you improve your site by customizing it.

Filters

Filters helps you to customize behavior of User Login Control in some situations.

ulf_row_status

This filter used to customize each status for users row.

Paramteres

$row_content
(string) Pre-prepared row content to display
$is_user_online
(bool) User online status
$last_login
(string) Last login human readable date (2 mins ago)

Usage

add_filter( 'ulf_row_status', function($row_status, $is_user_online, $last_login){
    return $row_status;
}, 10, 3);

ulf_redirect_after_request

Set your custom url that redirect after handling requests (Logout user, Logout all users).

Paramteres

$redirect_url
(string) Redirect url

Usage

add_filter( 'ulf_redirect_after_bulk_request', function($redirect) {
    // default is users.php
    return 'tools.php';
}, 10 , 1 );

ulf_last_login

Set your custom last login format.

Paramteres

$human_readable_date
(string) Human readable date (1 hour ago)
$last_login
(int) last login timestamp

Usage

add_filter( 'ulf_last_login', function($human_readable, $last_login) {
    return "It's been $human_readable";
}, 10 , 2);

ulf_lockdown_message

Customize lockdown error message.

Paramteres

$message
(string) Already defined message

Usage

add_filter( 'ulf_lockdown_message', function($message) {
    return 'Not a good time for login.';
}, 10, 1);

Actions

ulf_before_load

Call before loading ulf classes.

ulf_after_load

Call after ulf initilized.

before_ulf_status_row_out, after_ulf_status_row_out

Before or after row is going to output.

before_ulf_handle_request

Before handling users table requests.

before_ulf_logout_user, after_ulf_logout_user

Before or after logout single user.

before_ulf_logout_all_users, after_ulf_logout_all_users

Before or after logout all users.

before_ulf_update_last_login, after_ulf_update_last_login

Before after update last login for user.

before_ulf_destroy_others, after_ulf_destroy_others

Before or after destroy other users session.

before_ulf_lockdown, after_ulf_lockdown

Before or after lockdown executed.

before_ulf_destroy_all_sessions_for_all_users, after_ulf_destroy_all_sessions_for_all_users

Before and after logout all sessions for all users (Executed in settings page).

Changelog

1.1

Added sanitizing and escaping data

1.0

Initial release

Contribute

Feel free to contribute on languages or source code.

You might also like...
Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library.

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library. Import Jamendo playlists with tracks in WordPress posts.

Add time dismissible admin notices to WordPress

WP Dismiss Notice Add time dismissible admin notices to WordPress. Fork of https://github.com/w3guy/persist-admin-notices-dismissal Instuctions Initia

This is code to create a new user as admin use for Wordpress FrontEnd Developer to prevent any scaming from clients

theme-setup This is code to create a new user as admin use for Wordpress FrontEnd Developer to prevent any scaming from clients How to use Just copy c

Adds a dashboard widget that allows admins to quickly open the edit screen for any WordPress post type- including orders, products, and subscriptions.
Adds a dashboard widget that allows admins to quickly open the edit screen for any WordPress post type- including orders, products, and subscriptions.

Quick Open Dashboard Widget Requires PHP: 7.0 WP requires at least: 5.7 WP tested up to: 5.7 WC requires at least: 5.6.0 WC tested up to: 5.8.0 Stable

A simple little WordPress block that allows you add social share icons to your website.
A simple little WordPress block that allows you add social share icons to your website.

Social Sharing Block This plugin requires WordPress 5.9+ or 5.8+ with Gutenberg active. A simple little block that allows you to add social share icon

The most powerful all in one, SEO-friendly theme for WordPress.

Help us Become a backer via Patreon. Make one time donation with PayPal. About Seven SERP Theme Seven SERP Theme is an open source WordPress theme. Wi

Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace

Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace, in order to prevent conflicts with other plugins loading the same dependencies in different versions.

This WordPress Plugin Boilerplate is meant for you to develop your own plugin on.

WordPress Plugin Boilerplate This plugin boilerplate is meant for you to develop your own plugin on. Support & collaboration Features OOP plugin core

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

Releases(1.4)
Owner
null
Adds WordPress toolbar menu that allows users to switch theme for themselves.

Toolbar Theme Switcher β€” for WordPress Plugin provides toolbar (admin bar) menu to quickly switch between available themes. Theme choice is individual

Andrey Savchenko 20 Jul 23, 2021
The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Pronamic 1 Oct 19, 2021
❓ A WordPress plugin to display your site's environment type in the admin bar

Where A WordPress plugin to display your site's environment type in the admin bar. Available Filters where_env_should_add_env_type - Defaults to true

Brad Parbs 7 Mar 29, 2022
Free WordPress plugin to generate Admin Settings Page.

ClioWP Settings Page ClioWP Setting Page is a free WordPress Plugin which creates a sample Settings Page. This β€œtest” page contains almost any type of

Christos Pontikis 5 Nov 3, 2022
WPCloudDeploy is a WordPress plugin that allows you to easily deploy servers at major cloud-server providers and then install apps

WPCloudDeploy is a WordPress plugin that allows you to easily deploy servers at major cloud-server providers and then install apps

WPCloudDeploy 41 Dec 24, 2022
A Wordpress plugin that allows you to customize a news feed on your home page

=== Plugin Name === Contributors: Noora Chahine Requires at least: 4.0.1 Tested up to: 5.4 Stable tag: 5.2 License: GPLv2 or later License URI: http:/

Noora Chahine 1 Nov 15, 2021
πŸš€ All-in-one enhancement plugin that improves WordPress & BuddyBoss integration.

=== Buddyboss Extended Add-on === Contributors: jcatama Donate link: https://www.paypal.me/jcatama Tags: buddyboss, buddypress, learndash, forums, gro

Albert Catama 1 Oct 12, 2022
A tool box of integrations for Cardano & WordPress all packaged into a neat plugin.

CardanoPress A tool box of integrations for Cardano & WordPress all packaged into a neat plugin. This plugin allows you to integrate various Cardano b

Peter Bui 38 Oct 4, 2022
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Waren Gonzaga 3 Nov 15, 2021
WordPress plugin that lets you use Discourse as the community engine for a WordPress blog

WP Discourse Note: the wp-discourse plugin requires >= PHP-5.4.0. The WP Discourse plugin acts as an interface between your WordPress site and your Di

Discourse 497 Dec 10, 2022