Plugin Directory

Changeset 2586531


Ignore:
Timestamp:
08/22/2021 07:13:34 AM (5 years ago)
Author:
babatechs
Message:

fixed a small issue

Location:
lock-user-account/tags/1.0.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lock-user-account/tags/1.0.2/includes/class-user-meta.php

    r1621243 r2586531  
    6161     */
    6262    public function output_column( $output, $column_name, $user_id ){
    63         return ( 'locked' === $column_name ) ? get_user_meta( (int)$user_id, sanitize_key( 'baba_user_locked' ), true ) : $output;
     63        if( 'locked' !== $column_name ) return $output;
     64        $locked = get_user_meta( $user_id, sanitize_key( 'baba_user_locked' ), true );
     65        return ( 'yes' === $locked ) ? __( 'Locked', 'babatechs' ) : __( 'Not Locked', 'babatechs' );
    6466    }
    6567   
     
    7577        //  Process lock request
    7678        if( 'lock' === $current_action ){
     79            $current_user_id = get_current_user_id();
    7780            foreach( $userids as $userid ){
     81                if( $userid == $current_user_id ) continue;
    7882                update_user_meta( (int)$userid, sanitize_key( 'baba_user_locked' ), 'yes' );
    7983            }
  • lock-user-account/tags/1.0.2/lock-user-account.php

    r1658064 r2586531  
    33/**
    44 * Plugin Name: Lock User Account
    5  * Plugin URI: http://www.babatechs.com
     5 * Plugin URI: http://www.teknigar.com
    66 * Description: Lock user accounts with custom message
    7  * Version: 1.0.2
    8  * Author: babaTechs
    9  * Author URI: http://www.babatechs.com
     7 * Version: 1.0.4
     8 * Author: teknigar
     9 * Author URI: http://www.teknigar.com
    1010 * Text Domain: babatechs
    1111 * Domain Path: /languages
    1212 *
    1313 * @package LockUserAccount
    14  * @author babaTechs
    15  * @version 1.0.2
     14 * @author teknigar
     15 * @version 1.0.3
    1616 */
    1717
  • lock-user-account/tags/1.0.2/readme.txt

    r2586528 r2586531  
    44Requires at least: 4.3
    55Tested up to: 5.8
    6 Stable tag: 4.3
     6Stable tag: 1.0.2
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1717It has feature to add custom lock message to show on login screen for locked account. You can add your custom locked account message by going Settings and then click on General, there you can enter the message in field has label as Locked User Message.
    1818
    19 **[Send your feedback](http://www.babatechs.com)**
     19**[Send your feedback](http://www.teknigar.com)**
    2020
    2121== Installation ==
     
    2929= Can I add custom error message =
    3030Yes, you can add custom error message by going in Settings and General.
     31
     32= What if I accidentally lock myself =
     33Logged in user can not lock himself, it will be skipped
    3134
    3235== Screenshots ==
     
    4851Improved code to save settings
    4952
     53= 1.0.3 =
     54Updated for WP 5.5
     55Prevented current user from being locked
     56
    5057== Upgrade Notice ==
    5158
    52 = 1.0.2 =
     59= 1.0.3 =
    5360Updated version
Note: See TracChangeset for help on using the changeset viewer.