MetaUser::getCountry PHP Method

getCountry() protected method

Get the name of the country of the registered user
protected getCountry ( ) : string
return string
    protected function getCountry()
    {
        require_once dirname(__FILE__) . '/../../classes/Country.php';
        require_once dirname(__FILE__) . '/../../classes/Language.php';
        $countryCode = $this->m_dbObject->getAttribute('country_code');
        $smartyObj = CampTemplate::singleton();
        $contextObj = $smartyObj->getTemplateVars('gimme');
        $country = new Country($countryCode, $contextObj->language->number);
        return !$country->exists() ? '' : $country->getName();
    }