summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-20 14:34:25 -0700
committerBrion Vibber <brion@pobox.com>2010-10-20 14:34:25 -0700
commit8004e2809d98bdd535a3c59bd7d15c3fa2dd7ba9 (patch)
tree177994041c35b5910d0227de6e64e8ff5c7667cc /lib/action.php
parent75ebf3c34844dbba0eb229d0c7d0d618118ce1ab (diff)
Fix for ticket #2845: singleuser nickname configuration was being overridden by site owner in router setup.
I've consolidated the checks for which user to use for single-user mode into User::singleUser(), which now uses the configured nickname by preference, falling back to the site owner if it's unset. This is now called consistently from the places that needed to use the primary user's nickname in routing setup. Setting $config['singleuser']['nickname'] should now work again as expected.
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/action.php b/lib/action.php
index 55ee83bde..e273b5d04 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -419,8 +419,9 @@ class Action extends HTMLOutputter // lawsuit
'class' => 'vcard'));
if (Event::handle('StartAddressData', array($this))) {
if (common_config('singleuser', 'enabled')) {
+ $user = User::singleUser();
$url = common_local_url('showstream',
- array('nickname' => common_config('singleuser', 'nickname')));
+ array('nickname' => $user->nickname));
} else {
$url = common_local_url('public');
}