diff options
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php index 6708d95b6..2bcb7c2a0 100644 --- a/classes/User.php +++ b/classes/User.php @@ -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; + } } |