From 747e83ff9523dfbd1a305379064995e1420c5379 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 19 Feb 2010 15:48:03 +0100 Subject: Make sure username is really canonical --- extensions/LLAuthPlugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.2