Hey there,

I'm trying to load a user's city and state into a custom user profile page using
print $user->location['CITY'];
print $user->location['PROVINCE'];

For some reason, this is only returning old city and state data. If I make a change to the user's location, the changes are not reflected in the user profile. I have checked the locations table in the database, and it does seem to be creating a record every time I edit the user's location. Any ideas on how I can fix this?

My setup is:
Drupal 5.1
PHP 5.2
location 5.x-2.7

thanks in advance,
ash

Comments

ashtronaut’s picture

Status: Active » Closed (fixed)

I found the solution.

Apparently this is not a location module issue, but a gmap issue. Anytime the user's address was updated, the gmap module added a record to the location table with a 0 latitude and a 0 longitude. Thus when the data was called from the location array, it would be 0 or null. The latest version of gmap fixes this bug. I am surprised that this wasn't a well known issue, but then again I was running on an older version of gmap. . . . oh well. . . lesson learned.

link to the gmap issue:
http://drupal.org/node/138942

ash

ashtronaut’s picture

This thread will also help people with this problem. . . .

http://drupal.org/node/187197#comment-619902