for single-user mode, retrieve either site owner or defined nickname

This commit is contained in:
Evan Prodromou 2010-01-29 15:15:52 -05:00
parent 70a4f8c0e2
commit a7b2a08c42

View File

@ -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',