[Mediawiki-l] Need Idea to replace "_" in Username/Script oranything else?

Lane, Ryan Ryan.Lane at ocean.navo.navy.mil
Wed Jan 10 14:46:52 UTC 2007

> Hi,
> im sorry that i wrote again with this problem.
> I became this on my last request.
> ------------
> MediaWiki does not support underscores in usernames.
> ------------
> OK, but we need it because its an internal Userdb and with 
> Version 1.5.8. MW works.
> Now i have an idea, but i dont no how to do it....is it possible.
> We have a POP-tunnel to an authentication server.
> ------------------------------
> function authenticate( $username, $password ) {
>                 return imap_open("{10.131.XX.XX/POP3:110}", 
> $username, $password );
>                 }
> -----------------------------------------------------------------
> Is it possible to (like a smal shell-script) replace 
> $username temp. in the MyAuth.php?
> We redirect in LocalSettings.php
> -------------
> require_once( 'extensions/MyAuthPlugin.php' );
> -------------
> The internal UserDB reaches ~3000 User, but i guess we are 
> only 20 people that use wiki....but we cant setup new usernames.
> Any ideas without the idea "Shut up" ;)

Did you bother to read my post on this subject? I told you exactly how
you could do it... Just in case you missed it for some reason:

"You don't need MediaWiki to add the username as User_Name. You can have
MediaWiki add it as User Name, or User-Name, etc. In your authentication
plugin's getCanonicalName() function, you can munge all underscores to
dashes, or to spaces. You will still authenticate the users with
underscores in the names."

So, what will happen is, your user will log in as Ryan_Lane; now,
MediaWiki will have your authentication plugin authenticate using
"Ryan_Lane", but will create an the account with the username returned
by $wgAuth->getCanonicalName(). In getCanonicalName, you can munge the
username from "Ryan_Lane" to "Ryan Lane", or "Ryan-Lane", etc.

Before you get annoyed at the people that you want to help you, you
really should make sure no one already *has* helped you.


Ryan Lane

More information about the MediaWiki-l mailing list