I think it would be logical for user locations to be deleted when the referenced user is deleted. Currently, user locations are left in the database. Probably just requires implementing a 'delete' case in location_user.

Comments

Triskelion’s picture

Slightly more serious than that. When updating a location, the module is inserting a new record, and the old record remains, but blank. This leads to a problem with duplicate listings for nodes in views. See #140079: Sorting duplicates nodes with multiple values.

mandclu’s picture

I solved my problem by adding the following to the bottom of location_user:

  if ($op == 'delete'  && $user->location['lid']) {
    db_query('DELETE FROM {location} WHERE lid = %d', $user->location['lid']);
    location_invoke_locationapi($user->location, 'delete');
  }

It looks like the same needs doing for location_nodeapi, I'll open a new issue for that.

bdragon’s picture

Status: Active » Closed (won't fix)

Wontfix for 1.x/2.x, already working in 3.x.