From 794163c31f643baa7181abf5dbd5de9f5634ac43 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 12 Aug 2013 14:40:55 +0200 Subject: [PATCH] Default to NOT ask for current location for new users It may be a bad experience for new users to immediately when trying out the service be asked for their geographical position. Instead, let them opt-in for this behaviour. --- classes/User.php | 7 +++---- lib/default.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/classes/User.php b/classes/User.php index e8aaaf6a10..75a600578a 100644 --- a/classes/User.php +++ b/classes/User.php @@ -874,13 +874,12 @@ class User extends Managed_DataObject } else if ($cfg == 'never') { return false; } else { // user - $share = true; + $share = common_config('location', 'sharedefault'); + // Check if user has a personal setting for this $prefs = User_location_prefs::staticGet('user_id', $this->id); - if (empty($prefs)) { - $share = common_config('location', 'sharedefault'); - } else { + if (!empty($prefs)) { $share = $prefs->share_location; $prefs->free(); } diff --git a/lib/default.php b/lib/default.php index 82ffe80a5d..b7e625ca22 100644 --- a/lib/default.php +++ b/lib/default.php @@ -294,7 +294,7 @@ $default = array('contentlimit' => null), 'location' => array('share' => 'user', // whether to share location; 'always', 'user', 'never' - 'sharedefault' => true), + 'sharedefault' => false), 'omb' => array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates 'logincommand' =>