From b848e1a61016203c24b5cf529bf48de7522f9109 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 12:23:48 +0200 Subject: allow special MediaWiki maintenance user --- extensions/FluxBBAuthPlugin.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/FluxBBAuthPlugin.php b/extensions/FluxBBAuthPlugin.php index 17bc2f24..e48c431c 100644 --- a/extensions/FluxBBAuthPlugin.php +++ b/extensions/FluxBBAuthPlugin.php @@ -132,12 +132,16 @@ public function initUser( &$user, $autocreate=false ) { } public function getCanonicalName( $username ) { - try { - $data = $this->getUserData($username); - } catch (Exception $e) { - return false; + if ($username != 'MediaWiki default') { + try { + $data = $this->getUserData($username); + return strtoupper(substr($data['username'], 0, 1)).substr($data['username'], 1); + } catch (Exception $e) { + return false; + } + } else { + return $username; } - return strtoupper(substr($data['username'], 0, 1)).substr($data['username'], 1); } } -- cgit v1.2.3-54-g00ecf