You are here

function ip2country_user_load in IP-based Determination of a Visitor's Country 7

Same name and namespace in other branches
  1. 8 ip2country.module \ip2country_user_load()

Implements hook_user_load().

Takes care of restoring country data from {users}.data.

File

./ip2country.module, line 187
Determination of user's Country based on IP.

Code

function ip2country_user_load($users) {
  foreach ($users as $user) {
    if (isset($user->data['country_iso_code_2'])) {
      $users[$user->uid]->country_iso_code_2 = $user->data['country_iso_code_2'];
    }
  }
}