Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

check_debug_log_override()

Description

Check and set the debug log override status for the current user.

This function determines if debug logging should be enabled based on system variables
and the user's ID. If a debug override is set for a specific user or globally, and the
override has not expired, debug logging will be activated. Expired overrides are removed.

Parameters

This function accepts no parameters.

Return

void

Location

include/debug_functions.php lines 12 to 41

Definition

 
function check_debug_log_override()
    {
    global 
$debug_log_override$userref;

    if (isset(
$debug_log_override) || !isset($userref))
        {
        return;
        }

    
$debug_log_override false;

    
$debug_user get_sysvar('debug_override_user','');
    
$debug_expires get_sysvar('debug_override_expires','');

    if (
$debug_user == "" || $debug_expires == "")
        {
        return;
        }

    if (
$debug_expires time())
        {
        
ps_query("DELETE FROM sysvars WHERE name='debug_override_user' OR name='debug_override_expires'",array());
        return;
        }

    if (
$debug_user == -|| $debug_user == $userref)
        {
        
$debug_log_override true;
        }
    }

This article was last updated 17th November 2024 15:35 Europe/London time based on the source file dated 13th November 2024 15:50 Europe/London time.