summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-23 11:46:44 -0400
committerEvan Prodromou <evan@status.net>2009-10-23 11:46:44 -0400
commit943b2bea09b484bd4709b6d2c4a3560ce82a2467 (patch)
treed9e9ba5bd865323531f232d7f1a305006773bfbd /classes/User.php
parent9608cc6143a135d6326a86724ddce040b3ab7a3a (diff)
update location while registering
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 0a70c9801..b300c9edb 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -198,6 +198,15 @@ class User extends Memcached_DataObject
}
if (!empty($location)) {
$profile->location = $location;
+
+ $loc = Location::fromName($location);
+
+ if (!empty($loc)) {
+ $profile->lat = $loc->lat;
+ $profile->lon = $loc->lon;
+ $profile->location_id = $loc->location_id;
+ $profile->location_ns = $loc->location_ns;
+ }
}
$profile->created = common_sql_now();