Welcome Guest, Not a member yet? Register   Sign In
Object Logging Library
#8

(This post was last modified: 05-22-2023, 06:25 AM by Stack News.)

I needed to adapt audits for use with shield and I had no other chance than to do it this way
PHP Code:
<?php

namespace Config;

/***
*
* This file contains example values to alter default library behavior.
* Recommended usage:
* 1. Copy the file to app/Config/Audits.php
* 2. Change any values
* 3. Remove any lines to fallback to defaults
*
***/

class Audits extends \Tatter\Audits\Config\Audits
{
    function __construct()
    {
        parent::__construct();
        $session = \Config\Services::session();
        $session->set(['logged_in' => session('user')['id'] ?? 0]);
    }

    // Session key in that contains the integer ID of a logged in user
    public $sessionUserId 'logged_in';

    // Whether to continue instead of throwing exceptions
    public $silent false;


Just find this way to use tattersoftware/codeigniter4-audits with shield included
Please I hope that audits for shield is updated
Reply


Messages In This Thread
Object Logging Library - by MGatner - 04-07-2019, 12:59 PM
RE: Object Logging Library - by Inc33 - 06-27-2020, 01:54 PM
RE: Object Logging Library - by MGatner - 06-29-2020, 04:17 PM
RE: Object Logging Library - by Inc33 - 06-30-2020, 02:48 AM
RE: Object Logging Library - by marcogmonteiro - 06-30-2020, 03:05 AM
RE: Object Logging Library - by MGatner - 06-30-2020, 06:36 PM
RE: Object Logging Library - by dgvirtual - 12-03-2021, 02:55 AM
RE: Object Logging Library - by Stack News - 05-22-2023, 06:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB