diff options
author | Evan Prodromou <evan@status.net> | 2010-01-29 15:15:52 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-29 15:15:52 -0500 |
commit | a7b2a08c42347d7beac43980a673b434a9c0331a (patch) | |
tree | 44f868f0afaa05ae19976f0578960ea054cab8ad | |
parent | 70a4f8c0e26bfdb76f595ce501c6e84a8011fea8 (diff) |
for single-user mode, retrieve either site owner or defined nickname
-rw-r--r-- | lib/router.php | 11 |
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', |