Reputation: 509
I encounter some issues while I want to integrate my mediawiki to my enterprise LDAP server with LDAPExtension. Our LDAP server uses email as uid, so I have to use email as the input username in mediawiki. But while I login with email, after LDAP authentication pass, mediawiki always prompt: "Auto-creation of a local account failed: You have not specified a valid username." , it means the username is invalid. I also tried to create a mediawiki user with email as username, it has same error.
So is it possible to let mediawiki ignore username validation to let email can be a username?
Upvotes: 0
Views: 1224
Reputation: 28160
Change $wgInvalidUsernameCharacters
.
Note that logging in with the email address might become possible at some point.
Upvotes: 1
Reputation: 533
Add these lines to the bottom of your LocalSettings.php
:
$wgUserrightsInterwikiDelimiter = "%";
$wgInvalidUsernameCharacters = "%:";
@
and leads to error if you will try to create account with @
in username@:
Upvotes: 3