Plugin Directory

Changeset 2944376


Ignore:
Timestamp:
07/27/2023 08:25:42 PM (3 years ago)
Author:
anderly
Message:

Release 1.3.5, 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.5/disable-user-login.php

    r2944363 r2944376  
    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.3.4
     6 * Version:     1.3.5
    77 *
    88 * Author:      Saint Systems
  • disable-user-login/tags/1.3.5/includes/class-ss-disable-user-login-plugin.php

    r2944363 r2944376  
    1616     * @var string
    1717     */
    18     private static $version = '1.3.4';
     18    private static $version = '1.3.5';
    1919
    2020    /**
     
    136136        add_filter( 'handle_bulk_actions-users',  array( $this, 'handle_bulk_disable_users'   ), 10, 3 );
    137137        add_filter( 'user_row_actions',           array( $this, 'add_quick_links'             ), 10, 2 );
     138        add_filter( 'wp_is_application_passwords_available_for_user', array( $this, 'maybe_disable_application_passwords_for_user' ), 10, 2 );
    138139
    139140    } //end function add_hooks
     
    159160        }
    160161        return $actions;
     162    }
     163
     164    /**
     165     * Prevent users with disabled accounts to use application passwords.
     166     *
     167     * @param bool $allow Whether to enable application passwords for the user. Default true.
     168     * @param WP_User $user user that is trying to access application passwords.
     169     *
     170     * @return bool true if application passwords should be enabled, false if it should be disabled.
     171     */
     172    function maybe_disable_application_passwords_for_user( $allow, $user ) {
     173        if ( $this->is_user_disabled( $user->ID ) ) {
     174            return false;
     175        }
     176
     177        return $allow;
    161178    }
    162179
  • disable-user-login/tags/1.3.5/readme.txt

    r2944363 r2944376  
    66Tested up to: 6.1.1
    77Requires PHP: 5.6
    8 Stable tag: 1.3.4
     8Stable tag: 1.3.5
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.5 =
     52* Fix to disable application passwords (fixes #7).
     53
    5154= 1.3.4 =
    5255* Add user enable/disable quick links.
  • disable-user-login/trunk/disable-user-login.php

    r2944363 r2944376  
    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.3.4
     6 * Version:     1.3.5
    77 *
    88 * Author:      Saint Systems
  • disable-user-login/trunk/includes/class-ss-disable-user-login-plugin.php

    r2944363 r2944376  
    1616     * @var string
    1717     */
    18     private static $version = '1.3.4';
     18    private static $version = '1.3.5';
    1919
    2020    /**
     
    136136        add_filter( 'handle_bulk_actions-users',  array( $this, 'handle_bulk_disable_users'   ), 10, 3 );
    137137        add_filter( 'user_row_actions',           array( $this, 'add_quick_links'             ), 10, 2 );
     138        add_filter( 'wp_is_application_passwords_available_for_user', array( $this, 'maybe_disable_application_passwords_for_user' ), 10, 2 );
    138139
    139140    } //end function add_hooks
     
    159160        }
    160161        return $actions;
     162    }
     163
     164    /**
     165     * Prevent users with disabled accounts to use application passwords.
     166     *
     167     * @param bool $allow Whether to enable application passwords for the user. Default true.
     168     * @param WP_User $user user that is trying to access application passwords.
     169     *
     170     * @return bool true if application passwords should be enabled, false if it should be disabled.
     171     */
     172    function maybe_disable_application_passwords_for_user( $allow, $user ) {
     173        if ( $this->is_user_disabled( $user->ID ) ) {
     174            return false;
     175        }
     176
     177        return $allow;
    161178    }
    162179
  • disable-user-login/trunk/readme.txt

    r2944363 r2944376  
    66Tested up to: 6.1.1
    77Requires PHP: 5.6
    8 Stable tag: 1.3.4
     8Stable tag: 1.3.5
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.5 =
     52* Fix to disable application passwords (fixes #7).
     53
    5154= 1.3.4 =
    5255* Add user enable/disable quick links.
Note: See TracChangeset for help on using the changeset viewer.