for single-user mode, retrieve either site owner or defined nickname
This commit is contained in:
parent
70a4f8c0e2
commit
a7b2a08c42
@ -649,7 +649,16 @@ class Router
|
|||||||
|
|
||||||
if (common_config('singleuser', 'enabled')) {
|
if (common_config('singleuser', 'enabled')) {
|
||||||
|
|
||||||
|
$user = User::siteOwner();
|
||||||
|
|
||||||
|
if (!empty($user)) {
|
||||||
|
$nickname = $user->nickname;
|
||||||
|
} else {
|
||||||
$nickname = common_config('singleuser', 'nickname');
|
$nickname = common_config('singleuser', 'nickname');
|
||||||
|
if (empty($nickname)) {
|
||||||
|
throw new ServerException(_("No single user defined for single-user mode."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (array('subscriptions', 'subscribers',
|
foreach (array('subscriptions', 'subscribers',
|
||||||
'all', 'foaf', 'xrds',
|
'all', 'foaf', 'xrds',
|
||||||
|
Loading…
Reference in New Issue
Block a user