} $User_Login = $userManager->getUserByUserId($userId); $id = $User_Login->getUserId(); $fname = $User_Login->getFirstName(); $lname = $User_Login->getLastName(); $email = $User_Login->getEmail(); $language = $User_Login->getUserLanguage(); $regdate = $User_Login->getRegistrationDate(); $locationId = $User_Login->getLocation(); $birth = $User_Login->getDOB(); $mediaId = $User_Login->getMediaId(); // get location $location = $locationManager->getLocationBylocationId($locationId); foreach ($location as $loc) { $Address = $loc->getAddress(); $PostalCode = $loc->getPostalCode(); $cityid = $loc->getCityId(); } // get city name $city = $locationManager->getCityById($cityid); $CityName = $city->getCityName(); $provId = $city->getProvinceId(); //get province name $province = $locationManager->getProvinceById($provId); $ProvinceName = $province->getProvinceName(); $countryId = $province->getCountryId(); //get Country Name $country = $locationManager->getCountriesNameById($countryId); foreach ($country as $cou) { $CountryName = $cou->getCountryName(); }