summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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',