]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
update location while registering
authorEvan Prodromou <evan@status.net>
Fri, 23 Oct 2009 15:46:44 +0000 (11:46 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 23 Oct 2009 15:46:44 +0000 (11:46 -0400)
classes/User.php

index 0a70c9801402f8038d1dc59bb72bf0204ce1f3c7..b300c9edb6a1ad63887f6a9144787206eff434f9 100644 (file)
@@ -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();