summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-02-19 15:48:03 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-02-19 15:48:03 +0100
commit747e83ff9523dfbd1a305379064995e1420c5379 (patch)
tree71c813f55f98c1aa3d5cb2f7051dd8094a26208c
parentdae7e02a41871704994ad75f5e7f5b70c7c5f5c8 (diff)
Make sure username is really canonical
-rw-r--r--extensions/LLAuthPlugin.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions/LLAuthPlugin.php b/extensions/LLAuthPlugin.php
index fa3d0703..f95a562b 100644
--- a/extensions/LLAuthPlugin.php
+++ b/extensions/LLAuthPlugin.php
@@ -121,7 +121,12 @@ public function initUser( &$user, $autocreate=false ) {
}
public function getCanonicalName( $username ) {
- return strtoupper(substr($username, 0, 1)).substr($username, 1);
+ try {
+ $data = $this->getUserData($username);
+ } catch (Exception $e) {
+ return false;
+ }
+ return strtoupper(substr($data['name'], 0, 1)).substr($data['name'], 1);
}
}