From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: experimental
Implementation User identity
Description Allows or denies account registration according to the submitted email account.
Author(s) gaboflowerstalk
Latest version 0.1
MediaWiki 1.32+
License GNU General Public License 2.0 or later

Check usage and version matrix.

The EmailRegistrationFilter checks an account creation, and forbids it following a blacklists of patterns (or only allows it following a whitelist, depending on the mode of use). It's intended to be a replacement for Extension:CheckEmailAddress. The extension works by extending a PrimaryAuthenticationProvider (actually, a LocalPasswordPrimaryAuthenticationProvider).


  • Download and place the file(s) in a directory called EmailRegistrationFilter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    wfLoadExtension( 'EmailRegistrationFilter' );
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

Within the $IP/extensions/EmailRegistrationFilter/extension.json file:


List of preg_match patterns to be tested against an email address.


True only allows a registation if the email matches a pattern in the value. If false, the PatternList becomes a blacklist.


Custom error message for a rejected registration.


If you want to only allow .edu and .int domains to be able to register with email address, you can use the following configuration:

"config": {
    "PatternList": {
        "value": [
        "description": "..."
    "IsWhiteList": {
        "value": true,
        "description": "..."
    "ErrorMessage": {
        "value": "Registration only allowed for .edu or .int domains",
        "description": "Custom error message"

If you want to block only those domains, change the IsWhiteList value from true to false.