summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/User.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/classes/User.php b/classes/User.php
index f381ec607..7345dc7f9 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -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.