src/Application.php
public function getUserProfile($attribute = null)
    {
        if (!ObjectFactoryHelper::getXmlFileWithPath(PROFILE_SERVICE)) {
            return null;
        }
        $profileService = Openbizx::getService(PROFILE_SERVICE);
        $profile = $this->getSessionContext()->getVar("_USER_PROFILE");
        if (method_exists($profileService, 'getProfile')) {
            return $profileService->getProfile($attribute);
        } else {
            $profile = $this->getSessionContext()->getVar("_USER_PROFILE");
            return isset($profile[$attribute]) ? $profile[$attribute] : "";
        }
    }
public function getUserProfile($attribute = null)
    {
        if (!ObjectFactoryHelper::getXmlFileWithPath(PROFILE_SERVICE)) {
            return null;
        }
        $profileService = Openbizx::getService(PROFILE_SERVICE);
        $profile = $this->getSessionContext()->getVar("_USER_PROFILE");
        if (method_exists($profileService, 'getProfile')) {
            return $profileService->getProfile($attribute);
        } else {
            $profile = $this->getSessionContext()->getVar("_USER_PROFILE");
            return isset($profile[$attribute]) ? $profile[$attribute] : "";
        }
    }
Get user profile

@param string $attribute user attribute
@return array user profile array