You are here

function location_user_user_insert in Location 7.3

Same name and namespace in other branches
  1. 7.4 location_user.module \location_user_user_insert()

Implements hook_user_insert().

File

./location_user.module, line 71
Associate locations with users.

Code

function location_user_user_insert(&$edit, $account, $category) {
  if (!empty($edit['locations'])) {
    location_save_locations($edit['locations'], array(
      'uid' => $account->uid,
    ));
  }
  unset($edit['locations']);
}