Plugin Directory

Changeset 2737295


Ignore:
Timestamp:
06/04/2022 10:00:42 AM (4 years ago)
Author:
logtivity
Message:

release 1.17.1

Location:
logtivity
Files:
58 added
6 edited

Legend:

Unmodified
Added
Removed
  • logtivity/trunk/Helpers/Logtivity_Wp_User.php

    r2492630 r2737295  
    4242    public function id()
    4343    {
     44        if ($this->user->ID == 0) {
     45            return;
     46        }
     47
    4448        return $this->user->ID;
    4549    }
     
    4751    public function userLogin()
    4852    {
     53        if ($this->user->ID == 0) {
     54            return;
     55        }
     56
    4957        return $this->user->user_login;
    5058    }
     
    96104        $meta = get_user_meta($this->user->ID, $meta_key, $returnString);
    97105
    98         if ($meta != '')
    99         {
     106        if ($meta != '') {
    100107            return $meta;
    101108        }
     
    121128    public function isLoggedIn()
    122129    {
    123         if ($this->user->ID == 0)
    124         {
     130        if ($this->user->ID == 0) {
    125131            return false;
    126132        }
     
    138144    public function hasRole($role)
    139145    {
    140         if ( in_array($role, $this->getRoles()) )
    141         {
     146        if ( in_array($role, $this->getRoles()) ) {
    142147            return true;
    143148        }
     
    166171            return $role;
    167172        }
    168 
    169         return false;
    170173    }
    171174
  • logtivity/trunk/Logs/Core/Logtivity_User.php

    r2625590 r2737295  
    66    {
    77        add_action('wp_login', [$this, 'userLoggedIn'], 10, 2);
    8         add_action('clear_auth_cookie', [$this, 'userLoggedOut']);
     8        add_action('wp_logout', [$this, 'userLoggedOut'], 10, 1);
    99        add_action( 'user_register', [$this, 'userCreated'], 10, 1 );
    1010        add_action( 'delete_user', [$this, 'userDeleted'] );
     
    2222    }
    2323
    24     public function userLoggedOut()
     24    public function userLoggedOut($user_id)
    2525    {
    26         $user = new Logtivity_WP_User();
     26        if ($user_id == 0) {
     27            return;
     28        }
     29       
     30        $user = new Logtivity_WP_User($user_id);
    2731
    28         return (new Logtivity_Logger())
    29                         ->setAction('User Logged Out')
    30                         ->setContext($user->getRole())
    31                         ->send();
     32        return (new Logtivity_Logger($user_id))
     33            ->setAction('User Logged Out')
     34            ->setContext($user->getRole())
     35            ->send();
    3236    }
    3337
  • logtivity/trunk/logtivity.php

    r2723235 r2737295  
    55 * Plugin URI:  https://logtivity.io
    66 * Description: Dedicated Event Monitoring for WordPress using Logtivity.io.
    7  * Version:     1.17.0
     7 * Version:     1.17.1
    88 * Author:      Logtivity
    99 * Text Domain: logtivity
     
    1212class Logtivity
    1313{
    14     protected $version = '1.17.0';
     14    protected $version = '1.17.1';
    1515
    1616    /**
  • logtivity/trunk/readme.md

    r2723235 r2737295  
    55Requires at least: 4.7
    66Tested up to: 5.9
    7 Stable tag: 1.17.0
     7Stable tag: 1.17.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.17.1 =
     282
     283_Release Date – Saturday 4th June 2022_
     284
     285* Fix occasional User Logged Out logging unnecessarily.
     286* Hide latest response info when debug mode is off.
     287
    281288= 1.17.0 =
    282289
  • logtivity/trunk/readme.txt

    r2723235 r2737295  
    55Requires at least: 4.7
    66Tested up to: 5.9
    7 Stable tag: 1.17.0
     7Stable tag: 1.17.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.17.1 =
     282
     283_Release Date – Saturday 4th June 2022_
     284
     285* Fix occasional User Logged Out logging unnecessarily.
     286* Hide latest response info when debug mode is off.
     287
    281288= 1.17.0 =
    282289
  • logtivity/trunk/views/settings.php

    r2723235 r2737295  
    169169</div>
    170170
    171 <?php // if (absint( $options['logtivity_enable_debug_mode'] )): ?>
     171<?php if (absint( $options['logtivity_enable_debug_mode'] )): ?>
    172172
    173173    <div class="postbox">
     
    197197    </div>
    198198
    199 <?php // endif ?>
     199<?php endif ?>
    200200
    201201<?php echo logtivity_view('_admin-footer', compact('options')); ?>
Note: See TracChangeset for help on using the changeset viewer.