Esempio n. 1
0
}
$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();
}
Esempio n. 2
0
$countrycode = $countryByProvinceId->getCountryCode();
echo "The Country  is: " . $countryname . "<br>";
$provincebyId = $LocationManager->getProvinceById(1);
echo "<br/><br/><br/><b>Provice by Id</b><br>";
$provinceid = $provincebyId->getProvinceId();
$ProvinceName = $provincebyId->getProvinceName();
$CountryId = $provincebyId->getCountryId();
echo "The Country  is: " . $ProvinceName . "<br>";
//getProvinceByName
$provincebyId = $LocationManager->getProvinceByName("balkh");
echo "<br/><br/><br/><b>Provice by Name</b><br>";
$provinceid = $provincebyId->getProvinceId();
$ProvinceName = $provincebyId->getProvinceName();
$CountryId = $provincebyId->getCountryId();
echo "The Country  is: " . $ProvinceName . "<br>";
$citybyid = $LocationManager->getCityById(1);
echo "<br/><br/><br/><b>CITYBY ID</b><br>";
$cityid = $citybyid->getCityId();
$cityname = $citybyid->getCityName();
echo "The Country  is: " . $cityname . "<br>";
$citybyid = $LocationManager->getCityByName("Toronto");
echo "<br/><br/><br/><b>CITYBY name</b><br>";
$cityid = $citybyid->getCityId();
$cityname = $citybyid->getCityName();
echo "The Country  is: " . $cityname . "<br>";
//getAddressesByCityId
$addressbycityid = $LocationManager->getAddressesByCityId($cityid);
echo "<br/><br/><br/><b>ADDRESSES BY CITY</b><br>";
$userCount = count($addressbycityid);
echo "Address:<br>";
if ($userCount > 0) {