]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
remove namespace setting from location; it's unused
[quix0rs-gnu-social.git] / classes / User.php
index 6708d95b6a52fea1dd6ba52abe79783ff5f7e545..2bcb7c2a0a1336918b2f30e0e461ef8da9f9c071 100644 (file)
@@ -996,4 +996,20 @@ class User extends Memcached_DataObject
 
         return $ids;
     }
+
+    function shareLocation()
+    {
+        $share = true;
+
+        $prefs = User_location_prefs::staticGet('user_id', $this->id);
+
+        if (empty($prefs)) {
+            $share = common_config('location', 'share');
+        } else {
+            $share = $prefs->share_location;
+            $prefs->free();
+        }
+
+        return $share;
+    }
 }