Plugin Directory

Changeset 2501976


Ignore:
Timestamp:
03/23/2021 05:55:10 PM (5 years ago)
Author:
anderly
Message:

Release 1.3.0, see readme.txt for the changelog.

Location:
disable-user-login
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • disable-user-login/tags/1.3.0/disable-user-login.php

    r2499715 r2501976  
    44 * Plugin URI:  http://wordpress.org/plugins/disable-user-login
    55 * Description: Provides the ability to disable user accounts and prevent them from logging in.
    6  * Version:     1.2.1
     6 * Version:     1.3.0
     7 *
    78 * Author:      Saint Systems
    89 * Author URI:  https://www.saintsystems.com
  • disable-user-login/tags/1.3.0/includes/class-ss-disable-user-login-plugin.php

    r2139618 r2501976  
    1616     * @var string
    1717     */
    18     private static $version = '1.2.0';
     18    private static $version = '1.3.0';
    1919
    2020    /**
     
    8282        add_action( 'admin_footer-users.php',     array( $this, 'manage_users_css'            )        );
    8383        add_action( 'admin_notices',              array( $this, 'bulk_disable_user_notices'   )        );
     84       
     85        // Disabled hook
     86        add_action( 'disable_user_login.user_disabled', array( $this, 'force_logout' ), 10, 1 );
    8487
    8588        // Filters
     
    399402    } //end function maybe_trigger_enabled_disabled_actions
    400403
     404    /**
     405     * Force the passed $user_id to logout of WP
     406     * @since 1.3.0
     407     * @param int $user_id The ID of the user to logout
     408     */
     409    public function force_logout( $user_id ) {
     410
     411        // Get all sessions for $user_id
     412        $sessions = WP_Session_Tokens::get_instance( $user_id );
     413
     414        // Destroy all the sessions for the user.
     415        $sessions->destroy_all();
     416
     417    } //end function force_logout
     418
    401419} //end class SS_Disable_User_Login_Plugin
  • disable-user-login/tags/1.3.0/readme.txt

    r2499715 r2501976  
    44Tags: users, user, login, account, disable
    55Requires at least: 4.7.0
    6 Tested up to: 5.6.0
     6Tested up to: 5.7.0
    77Requires PHP: 5.6
    8 Stable tag: 1.2.1
     8Stable tag: 1.3.0
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.0 =
     52* Force disabled users to logout.
     53* Tested up to WP 5.7
     54
    5155= 1.2.1 =
    5256* Tested up to WP 5.6
  • disable-user-login/trunk/disable-user-login.php

    r2499715 r2501976  
    44 * Plugin URI:  http://wordpress.org/plugins/disable-user-login
    55 * Description: Provides the ability to disable user accounts and prevent them from logging in.
    6  * Version:     1.2.1
     6 * Version:     1.3.0
     7 *
    78 * Author:      Saint Systems
    89 * Author URI:  https://www.saintsystems.com
  • disable-user-login/trunk/includes/class-ss-disable-user-login-plugin.php

    r2139618 r2501976  
    1616     * @var string
    1717     */
    18     private static $version = '1.2.0';
     18    private static $version = '1.3.0';
    1919
    2020    /**
     
    8282        add_action( 'admin_footer-users.php',     array( $this, 'manage_users_css'            )        );
    8383        add_action( 'admin_notices',              array( $this, 'bulk_disable_user_notices'   )        );
     84       
     85        // Disabled hook
     86        add_action( 'disable_user_login.user_disabled', array( $this, 'force_logout' ), 10, 1 );
    8487
    8588        // Filters
     
    399402    } //end function maybe_trigger_enabled_disabled_actions
    400403
     404    /**
     405     * Force the passed $user_id to logout of WP
     406     * @since 1.3.0
     407     * @param int $user_id The ID of the user to logout
     408     */
     409    public function force_logout( $user_id ) {
     410
     411        // Get all sessions for $user_id
     412        $sessions = WP_Session_Tokens::get_instance( $user_id );
     413
     414        // Destroy all the sessions for the user.
     415        $sessions->destroy_all();
     416
     417    } //end function force_logout
     418
    401419} //end class SS_Disable_User_Login_Plugin
  • disable-user-login/trunk/readme.txt

    r2499715 r2501976  
    44Tags: users, user, login, account, disable
    55Requires at least: 4.7.0
    6 Tested up to: 5.6.0
     6Tested up to: 5.7.0
    77Requires PHP: 5.6
    8 Stable tag: 1.2.1
     8Stable tag: 1.3.0
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.0 =
     52* Force disabled users to logout.
     53* Tested up to WP 5.7
     54
    5155= 1.2.1 =
    5256* Tested up to WP 5.6
Note: See TracChangeset for help on using the changeset viewer.