summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 12:23:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 12:23:48 +0200
commitb848e1a61016203c24b5cf529bf48de7522f9109 (patch)
tree2d452f6f7881b0520dc9b96d27a4b4508ae607b0
parent222b01f5169f1c7e69762e0e8904c24f78f71882 (diff)
allow special MediaWiki maintenance user
-rw-r--r--extensions/FluxBBAuthPlugin.php14
1 files 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);
}
}