fall back to siteowner on bad nickname (Bug#2861)
This commit is contained in:
parent
22a0cf6251
commit
b5206fe6ca
@ -889,13 +889,23 @@ class User extends Memcached_DataObject
|
||||
static function singleUser()
|
||||
{
|
||||
if (common_config('singleuser', 'enabled')) {
|
||||
|
||||
$user = null;
|
||||
|
||||
$nickname = common_config('singleuser', 'nickname');
|
||||
if ($nickname) {
|
||||
|
||||
if (!empty($nickname)) {
|
||||
$user = User::staticGet('nickname', $nickname);
|
||||
} else {
|
||||
}
|
||||
|
||||
// if there was no nickname or no user by that nickname,
|
||||
// try the site owner.
|
||||
|
||||
if (empty($user)) {
|
||||
$user = User::siteOwner();
|
||||
}
|
||||
if ($user) {
|
||||
|
||||
if (!empty($user)) {
|
||||
return $user;
|
||||
} else {
|
||||
// TRANS: Server exception.
|
||||
|
Loading…
Reference in New Issue
Block a user