Plugin Directory

Changeset 2624596


Ignore:
Timestamp:
11/04/2021 03:58:43 PM (4 years ago)
Author:
anderly
Message:

Release 1.3.2, see readme.txt for the changelog.

Location:
disable-user-login
Files:
4 added
8 edited
1 copied

Legend:

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

    r2511724 r2624596  
    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.1
    7  * 
     6 * Version:     1.3.2
     7 *
    88 * Author:      Saint Systems
    99 * Author URI:  https://www.saintsystems.com
     
    1111 * Domain Path: languages
    1212 *
    13  * Copyright: 2019 Saint Systems
     13 * Copyright: © 2019 Saint Systems
    1414 * License: GNU General Public License v3.0
    1515 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • disable-user-login/tags/1.3.2/includes/class-ss-disable-user-login-plugin.php

    r2511724 r2624596  
    1616     * @var string
    1717     */
    18     private static $version = '1.3.1';
     18    private static $version = '1.3.2';
    1919
    2020    /**
     
    3939    public static function version() {
    4040        return self::$version;
     41    }
     42
     43    /**
     44     * Returns the user meta key
     45     *
     46     * @return string
     47     */
     48    public static function user_meta_key() {
     49        return self::$user_meta_key;
    4150    }
    4251
     
    7988        add_action( 'personal_options_update',    array( $this, 'save_disabled_field'         )        );
    8089        add_action( 'edit_user_profile_update',   array( $this, 'save_disabled_field'         )        );
    81         add_action( 'manage_users_custom_column', array( $this, 'manage_users_column_content' ), 10, 3 );
     90        add_filter( 'manage_users_custom_column', array( $this, 'manage_users_column_content' ), 10, 3 );
    8291        add_action( 'admin_footer-users.php',     array( $this, 'manage_users_css'            )        );
    8392        add_action( 'admin_notices',              array( $this, 'bulk_disable_user_notices'   )        );
    84        
     93
    8594        // Disabled hook
    8695        add_action( 'disable_user_login.user_disabled', array( $this, 'force_logout' ), 10, 1 );
     
    127136        $mofile = sprintf( '%1$s-%2$s.mo', 'disable-user-login', $locale );
    128137
    129         // Look for wp-content/languages/woocommerce-mailchimp/woocommerce-mailchimp-{lang}_{country}.mo
     138        // Look for wp-content/languages/disable-user-login/disable-user-login-{lang}_{country}.mo
    130139        $mofile_global1 = WP_LANG_DIR . '/disable-user-login/' . $mofile;
    131140
    132         // Look in wp-content/languages/plugins/woocommerce-mailchimp
     141        // Look in wp-content/languages/plugins/disable-user-login
    133142        $mofile_global2 = WP_LANG_DIR . '/plugins/disable-user-login/' . $mofile;
    134143
     
    166175                <tr>
    167176                    <th>
    168                         <label for="disable_user_login"><?php _e(' Disable User Account', 'disable_user_login' ); ?></label>
     177                        <label for="disable_user_login"><?php _e('Disable User Account', 'disable-user-login' ); ?></label>
    169178                    </th>
    170179                    <td>
    171180                        <input type="checkbox" name="disable_user_login" id="disable_user_login" value="1" <?php checked( 1, get_the_author_meta( self::$user_meta_key, $user->ID ) ); ?> />
    172                         <span class="description"><?php _e( 'If checked, the user cannot login with this account.' , 'disable_user_login' ); ?></span>
     181                        <label for="disable_user_login"><span class="description"><?php _e( 'If checked, the user cannot login with this account.' , 'disable-user-login' ); ?></span></label>
    173182                    </td>
    174183                </tr>
     
    250259                do_action( 'disable_user_login.disabled_login_attempt', $user );
    251260
    252                 return new WP_Error( 'disable_user_login_user_disabled', apply_filters( 'disable_user_login.disabled_message', __( '<strong>ERROR</strong>: Account disabled.', 'disable_user_login' ) ) );
     261                return new WP_Error( 'disable_user_login_user_disabled', apply_filters( 'disable_user_login.disabled_message', __( '<strong>ERROR</strong>: Account disabled.', 'disable-user-login' ) ) );
    253262            }
    254263        }
     
    274283     * Set content of disabled users column
    275284     *
    276      * @since 1.0.0
    277      * @param empty $empty
     285     * @since 1.3.2
     286     * @param empty $output
    278287     * @param string $column_name
    279      * @param int $user_ID
     288     * @param int $user_id
    280289     * @return string
    281290     */
    282     public function manage_users_column_content( $empty, $column_name, $user_ID ) {
     291    public function manage_users_column_content( $output, $column_name, $user_id ) {
    283292
    284293        if ( $column_name == 'disable_user_login' ) {
    285             if ( get_the_author_meta( self::$user_meta_key, $user_ID ) == 1 ) {
     294            if ( get_the_author_meta( self::$user_meta_key, $user_id ) == 1 ) {
    286295                return __( 'Disabled', 'disable-user-login' );
    287296            }
    288297        }
    289     }
    290 
    291     /**
    292      * Specifiy the width of our custom column
     298
     299        return $output; // always return, otherwise we overwrite stuff from other plugins.
     300    }
     301
     302    /**
     303     * Specify the width of our custom column
    293304     *
    294305     * @since 1.0.0
     
    418429        }
    419430        /**
    420          * Trigger an action when a user's account is enabled
     431         * Trigger an action when an enabled user's account is disabled
    421432         *
    422433         * @since 1.2.0
  • disable-user-login/tags/1.3.2/languages/disable-user-login.pot

    r2139618 r2624596  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Disable User Login\n"
    6 "POT-Creation-Date: 2019-08-14 11:03-0500\n"
    7 "PO-Revision-Date: 2019-08-14 11:03-0500\n"
     6"POT-Creation-Date: 2021-06-25 14:37-0500\n"
     7"PO-Revision-Date: 2021-06-25 14:37-0500\n"
     8"Last-Translator: \n"
     9"Language-Team: \n"
    810"MIME-Version: 1.0\n"
    911"Content-Type: text/plain; charset=UTF-8\n"
    1012"Content-Transfer-Encoding: 8bit\n"
    11 "X-Generator: Poedit 1.8.12\n"
     13"X-Generator: Poedit 3.0\n"
    1214"X-Poedit-Basepath: ..\n"
     15"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
    1316"X-Poedit-WPHeader: disable-user-login.php\n"
    1417"X-Poedit-SourceCharset: UTF-8\n"
     
    1720"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
    1821"X-Poedit-SearchPath-0: .\n"
    19 "X-Poedit-SearchPathExcluded-0: *.js\n"
     22"X-Poedit-SearchPathExcluded-0: *.min.js\n"
    2023
    21 #: includes/class-ss-disable-user-login-plugin.php:165
    22 msgid " Disable User Account"
     24#: includes/class-ss-disable-user-login-plugin.php:168
     25msgid "Disable User Account"
    2326msgstr ""
    2427
    25 #: includes/class-ss-disable-user-login-plugin.php:169
     28#: includes/class-ss-disable-user-login-plugin.php:172
    2629msgid "If checked, the user cannot login with this account."
    2730msgstr ""
    2831
    29 #: includes/class-ss-disable-user-login-plugin.php:231
     32#: includes/class-ss-disable-user-login-plugin.php:252
    3033msgid "<strong>ERROR</strong>: Account disabled."
    3134msgstr ""
    3235
    33 #: includes/class-ss-disable-user-login-plugin.php:248
    34 #: includes/class-ss-disable-user-login-plugin.php:265
     36#: includes/class-ss-disable-user-login-plugin.php:269
     37#: includes/class-ss-disable-user-login-plugin.php:286
    3538msgid "Disabled"
    3639msgstr ""
    3740
    38 #: includes/class-ss-disable-user-login-plugin.php:284
     41#: includes/class-ss-disable-user-login-plugin.php:307
    3942msgid "Enable"
    4043msgstr ""
    4144
    42 #: includes/class-ss-disable-user-login-plugin.php:285
     45#: includes/class-ss-disable-user-login-plugin.php:308
    4346msgid "Disable"
    4447msgstr ""
    4548
    46 #: includes/class-ss-disable-user-login-plugin.php:327
     49#: includes/class-ss-disable-user-login-plugin.php:359
    4750#, php-format
    4851msgid "Enabled %s user."
     
    5154msgstr[1] ""
    5255
    53 #: includes/class-ss-disable-user-login-plugin.php:337
     56#: includes/class-ss-disable-user-login-plugin.php:369
    5457#, php-format
    5558msgid "Disabled %s user."
     
    5760msgstr[0] ""
    5861msgstr[1] ""
     62
     63#. Plugin Name of the plugin/theme
     64msgid "Disable User Login"
     65msgstr ""
     66
     67#. Plugin URI of the plugin/theme
     68msgid "http://wordpress.org/plugins/disable-user-login"
     69msgstr ""
     70
     71#. Description of the plugin/theme
     72msgid ""
     73"Provides the ability to disable user accounts and prevent them from logging "
     74"in."
     75msgstr ""
     76
     77#. Author of the plugin/theme
     78msgid "Saint Systems"
     79msgstr ""
     80
     81#. Author URI of the plugin/theme
     82msgid "https://www.saintsystems.com"
     83msgstr ""
  • disable-user-login/tags/1.3.2/readme.txt

    r2511724 r2624596  
    11=== Disable User Login ===
    22Contributors: saintsystems, anderly
    3 Donate link: http://ssms.us/hVdk
     3Donate link: https://ssms.us/donate
    44Tags: users, user, login, account, disable
    55Requires at least: 4.7.0
    6 Tested up to: 5.7.0
     6Tested up to: 5.7
    77Requires PHP: 5.6
    8 Stable tag: 1.3.1
     8Stable tag: 1.3.2
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.2 =
     52* Static method to return user meta key
     53* Fix some comments
     54
    5155= 1.3.1 =
    5256* Update to prevent disabling super admins on bulk disable.
  • disable-user-login/trunk/disable-user-login.php

    r2511724 r2624596  
    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.1
    7  * 
     6 * Version:     1.3.2
     7 *
    88 * Author:      Saint Systems
    99 * Author URI:  https://www.saintsystems.com
     
    1111 * Domain Path: languages
    1212 *
    13  * Copyright: 2019 Saint Systems
     13 * Copyright: © 2019 Saint Systems
    1414 * License: GNU General Public License v3.0
    1515 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • disable-user-login/trunk/includes/class-ss-disable-user-login-plugin.php

    r2511724 r2624596  
    1616     * @var string
    1717     */
    18     private static $version = '1.3.1';
     18    private static $version = '1.3.2';
    1919
    2020    /**
     
    3939    public static function version() {
    4040        return self::$version;
     41    }
     42
     43    /**
     44     * Returns the user meta key
     45     *
     46     * @return string
     47     */
     48    public static function user_meta_key() {
     49        return self::$user_meta_key;
    4150    }
    4251
     
    7988        add_action( 'personal_options_update',    array( $this, 'save_disabled_field'         )        );
    8089        add_action( 'edit_user_profile_update',   array( $this, 'save_disabled_field'         )        );
    81         add_action( 'manage_users_custom_column', array( $this, 'manage_users_column_content' ), 10, 3 );
     90        add_filter( 'manage_users_custom_column', array( $this, 'manage_users_column_content' ), 10, 3 );
    8291        add_action( 'admin_footer-users.php',     array( $this, 'manage_users_css'            )        );
    8392        add_action( 'admin_notices',              array( $this, 'bulk_disable_user_notices'   )        );
    84        
     93
    8594        // Disabled hook
    8695        add_action( 'disable_user_login.user_disabled', array( $this, 'force_logout' ), 10, 1 );
     
    127136        $mofile = sprintf( '%1$s-%2$s.mo', 'disable-user-login', $locale );
    128137
    129         // Look for wp-content/languages/woocommerce-mailchimp/woocommerce-mailchimp-{lang}_{country}.mo
     138        // Look for wp-content/languages/disable-user-login/disable-user-login-{lang}_{country}.mo
    130139        $mofile_global1 = WP_LANG_DIR . '/disable-user-login/' . $mofile;
    131140
    132         // Look in wp-content/languages/plugins/woocommerce-mailchimp
     141        // Look in wp-content/languages/plugins/disable-user-login
    133142        $mofile_global2 = WP_LANG_DIR . '/plugins/disable-user-login/' . $mofile;
    134143
     
    166175                <tr>
    167176                    <th>
    168                         <label for="disable_user_login"><?php _e(' Disable User Account', 'disable_user_login' ); ?></label>
     177                        <label for="disable_user_login"><?php _e('Disable User Account', 'disable-user-login' ); ?></label>
    169178                    </th>
    170179                    <td>
    171180                        <input type="checkbox" name="disable_user_login" id="disable_user_login" value="1" <?php checked( 1, get_the_author_meta( self::$user_meta_key, $user->ID ) ); ?> />
    172                         <span class="description"><?php _e( 'If checked, the user cannot login with this account.' , 'disable_user_login' ); ?></span>
     181                        <label for="disable_user_login"><span class="description"><?php _e( 'If checked, the user cannot login with this account.' , 'disable-user-login' ); ?></span></label>
    173182                    </td>
    174183                </tr>
     
    250259                do_action( 'disable_user_login.disabled_login_attempt', $user );
    251260
    252                 return new WP_Error( 'disable_user_login_user_disabled', apply_filters( 'disable_user_login.disabled_message', __( '<strong>ERROR</strong>: Account disabled.', 'disable_user_login' ) ) );
     261                return new WP_Error( 'disable_user_login_user_disabled', apply_filters( 'disable_user_login.disabled_message', __( '<strong>ERROR</strong>: Account disabled.', 'disable-user-login' ) ) );
    253262            }
    254263        }
     
    274283     * Set content of disabled users column
    275284     *
    276      * @since 1.0.0
    277      * @param empty $empty
     285     * @since 1.3.2
     286     * @param empty $output
    278287     * @param string $column_name
    279      * @param int $user_ID
     288     * @param int $user_id
    280289     * @return string
    281290     */
    282     public function manage_users_column_content( $empty, $column_name, $user_ID ) {
     291    public function manage_users_column_content( $output, $column_name, $user_id ) {
    283292
    284293        if ( $column_name == 'disable_user_login' ) {
    285             if ( get_the_author_meta( self::$user_meta_key, $user_ID ) == 1 ) {
     294            if ( get_the_author_meta( self::$user_meta_key, $user_id ) == 1 ) {
    286295                return __( 'Disabled', 'disable-user-login' );
    287296            }
    288297        }
    289     }
    290 
    291     /**
    292      * Specifiy the width of our custom column
     298
     299        return $output; // always return, otherwise we overwrite stuff from other plugins.
     300    }
     301
     302    /**
     303     * Specify the width of our custom column
    293304     *
    294305     * @since 1.0.0
     
    418429        }
    419430        /**
    420          * Trigger an action when a user's account is enabled
     431         * Trigger an action when an enabled user's account is disabled
    421432         *
    422433         * @since 1.2.0
  • disable-user-login/trunk/languages/disable-user-login.pot

    r2139618 r2624596  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Disable User Login\n"
    6 "POT-Creation-Date: 2019-08-14 11:03-0500\n"
    7 "PO-Revision-Date: 2019-08-14 11:03-0500\n"
     6"POT-Creation-Date: 2021-06-25 14:37-0500\n"
     7"PO-Revision-Date: 2021-06-25 14:37-0500\n"
     8"Last-Translator: \n"
     9"Language-Team: \n"
    810"MIME-Version: 1.0\n"
    911"Content-Type: text/plain; charset=UTF-8\n"
    1012"Content-Transfer-Encoding: 8bit\n"
    11 "X-Generator: Poedit 1.8.12\n"
     13"X-Generator: Poedit 3.0\n"
    1214"X-Poedit-Basepath: ..\n"
     15"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
    1316"X-Poedit-WPHeader: disable-user-login.php\n"
    1417"X-Poedit-SourceCharset: UTF-8\n"
     
    1720"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
    1821"X-Poedit-SearchPath-0: .\n"
    19 "X-Poedit-SearchPathExcluded-0: *.js\n"
     22"X-Poedit-SearchPathExcluded-0: *.min.js\n"
    2023
    21 #: includes/class-ss-disable-user-login-plugin.php:165
    22 msgid " Disable User Account"
     24#: includes/class-ss-disable-user-login-plugin.php:168
     25msgid "Disable User Account"
    2326msgstr ""
    2427
    25 #: includes/class-ss-disable-user-login-plugin.php:169
     28#: includes/class-ss-disable-user-login-plugin.php:172
    2629msgid "If checked, the user cannot login with this account."
    2730msgstr ""
    2831
    29 #: includes/class-ss-disable-user-login-plugin.php:231
     32#: includes/class-ss-disable-user-login-plugin.php:252
    3033msgid "<strong>ERROR</strong>: Account disabled."
    3134msgstr ""
    3235
    33 #: includes/class-ss-disable-user-login-plugin.php:248
    34 #: includes/class-ss-disable-user-login-plugin.php:265
     36#: includes/class-ss-disable-user-login-plugin.php:269
     37#: includes/class-ss-disable-user-login-plugin.php:286
    3538msgid "Disabled"
    3639msgstr ""
    3740
    38 #: includes/class-ss-disable-user-login-plugin.php:284
     41#: includes/class-ss-disable-user-login-plugin.php:307
    3942msgid "Enable"
    4043msgstr ""
    4144
    42 #: includes/class-ss-disable-user-login-plugin.php:285
     45#: includes/class-ss-disable-user-login-plugin.php:308
    4346msgid "Disable"
    4447msgstr ""
    4548
    46 #: includes/class-ss-disable-user-login-plugin.php:327
     49#: includes/class-ss-disable-user-login-plugin.php:359
    4750#, php-format
    4851msgid "Enabled %s user."
     
    5154msgstr[1] ""
    5255
    53 #: includes/class-ss-disable-user-login-plugin.php:337
     56#: includes/class-ss-disable-user-login-plugin.php:369
    5457#, php-format
    5558msgid "Disabled %s user."
     
    5760msgstr[0] ""
    5861msgstr[1] ""
     62
     63#. Plugin Name of the plugin/theme
     64msgid "Disable User Login"
     65msgstr ""
     66
     67#. Plugin URI of the plugin/theme
     68msgid "http://wordpress.org/plugins/disable-user-login"
     69msgstr ""
     70
     71#. Description of the plugin/theme
     72msgid ""
     73"Provides the ability to disable user accounts and prevent them from logging "
     74"in."
     75msgstr ""
     76
     77#. Author of the plugin/theme
     78msgid "Saint Systems"
     79msgstr ""
     80
     81#. Author URI of the plugin/theme
     82msgid "https://www.saintsystems.com"
     83msgstr ""
  • disable-user-login/trunk/readme.txt

    r2511724 r2624596  
    11=== Disable User Login ===
    22Contributors: saintsystems, anderly
    3 Donate link: http://ssms.us/hVdk
     3Donate link: https://ssms.us/donate
    44Tags: users, user, login, account, disable
    55Requires at least: 4.7.0
    6 Tested up to: 5.7.0
     6Tested up to: 5.7
    77Requires PHP: 5.6
    8 Stable tag: 1.3.1
     8Stable tag: 1.3.2
    99License: GPLv3
    1010
     
    4949== Changelog ==
    5050
     51= 1.3.2 =
     52* Static method to return user meta key
     53* Fix some comments
     54
    5155= 1.3.1 =
    5256* Update to prevent disabling super admins on bulk disable.
Note: See TracChangeset for help on using the changeset viewer.