diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-28 16:26:34 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-28 16:26:34 -0700 |
commit | b26eccf33cf69c04a96d5d6d3eddc0ef68ffd4b1 (patch) | |
tree | 9d7e6ecfb361b3f9c2149d3b6400ea0d84f9c497 /classes/User.php | |
parent | 1851933c344307fdbd864489bf6f1a42bf6a6096 (diff) | |
parent | 9e516ed1bbb7b7a32fce006e5f2915b0ca344b98 (diff) |
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/classes/User.php b/classes/User.php index 9188938b1..5914f0b80 100644 --- a/classes/User.php +++ b/classes/User.php @@ -884,13 +884,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. |