HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/helpdesk.wb-webdesign.com/public_html/vendor/uvdesk/api-bundle/API/Me.php
<?php

namespace Webkul\UVDesk\ApiBundle\API;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Webkul\UVDesk\CoreFrameworkBundle\Entity\User;
use Webkul\UVDesk\CoreFrameworkBundle\Services\UVDeskService as Uvdesk;

class Me extends AbstractController
{
    public function loadCurrentAgentDetails(Request $request, Uvdesk $uvdesk)
    {
        $user = $this->getUser();
        $userInstance = $user->getCurrentInstance();

        $thumbnail = $uvdesk->generateCompleteLocalResourcePathUri($userInstance->getProfileImagePath() ?? $this->getParameter('assets_default_agent_profile_image_path'));
        $scopes = $uvdesk->getAvailableUserAccessScopes($user, $userInstance);

        return new JsonResponse([
            'success' => true, 
            'me' => [
                'id'        => $user->getId(), 
                'email'     => $user->getEmail(), 
                'name'      => trim(implode(' ', array_values(array_filter([$user->getFirstName(), $user->getLastName()])))), 
                'firstName' => $user->getFirstName(), 
                'lastName'  => $user->getLastName(), 
                'isEnabled' => $user->getIsEnabled(), 
                'thumbnail' => $thumbnail, 
            ], 
            'scopes' => $scopes,
        ]);
    }
}