You are here

function smart_ip_set_location_data in Smart IP 7.2

Same name and namespace in other branches
  1. 6.2 smart_ip.module \smart_ip_set_location_data()
  2. 6 smart_ip.module \smart_ip_set_location_data()
  3. 7 smart_ip.module \smart_ip_set_location_data()

Set the user's location information

File

./smart_ip.module, line 1112
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

function smart_ip_set_location_data($account, $location) {
  global $user;
  if ($account->uid == $user->uid) {
    smart_ip_set_session_data($location);
  }
  smart_ip_set_user_data($account, $location);
}