summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-29 15:15:52 -0500
committerEvan Prodromou <evan@status.net>2010-01-29 15:15:52 -0500
commita7b2a08c42347d7beac43980a673b434a9c0331a (patch)
tree44f868f0afaa05ae19976f0578960ea054cab8ad
parent70a4f8c0e26bfdb76f595ce501c6e84a8011fea8 (diff)
for single-user mode, retrieve either site owner or defined nickname
-rw-r--r--lib/router.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php
index be9cfac0c..ca9f32812 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -649,7 +649,16 @@ class Router
if (common_config('singleuser', 'enabled')) {
- $nickname = common_config('singleuser', 'nickname');
+ $user = User::siteOwner();
+
+ if (!empty($user)) {
+ $nickname = $user->nickname;
+ } else {
+ $nickname = common_config('singleuser', 'nickname');
+ if (empty($nickname)) {
+ throw new ServerException(_("No single user defined for single-user mode."));
+ }
+ }
foreach (array('subscriptions', 'subscribers',
'all', 'foaf', 'xrds',