[Mediawiki-l] Intercepting Usersname in $_POST for Special:Userlogin

Lane, Ryan Ryan.Lane at ocean.navo.navy.mil
Thu Aug 16 22:13:56 UTC 2007

Take a look at how I do it in the LdapAuthentication plugin.
AuthPlugin:: getCanonicalName takes care of this. If you are using the
AutoAuth hook, take a look at the SSLAuth function specifically (notice
that the SSLAuth function calls $wgAuth->getCanonicalName()).


Ryan Lane

> -----Original Message-----
> From: mediawiki-l-bounces at lists.wikimedia.org [mailto:mediawiki-l-
> bounces at lists.wikimedia.org] On Behalf Of Michael B Allen
> Sent: Thursday, August 16, 2007 5:03 PM
> To: mediawiki-l
> Subject: [Mediawiki-l] Intercepting Usersname in $_POST for
> Special:Userlogin
> Hello,
> I have an AuthPlugin with which users may enter a username with a
> domain component like:
>   EXAMPLE\alice
> or
>   alice at example.com
> I am trying to find a way for our plugin to canonicalize these names.
> Is there a hook or somewhere that I can canonicalize usernames?
> Setting the nickname in AuthPlugin::updateUser has no effect. Setting
> $user->mName directly does not work because of logic at the top of
> SpecialUserLogin::authenticateUserData that runs before
> AuthPlugin::authenticate.
> How does one do this?
> Mike
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

More information about the MediaWiki-l mailing list