![]() Release status: unmaintained |
|
---|---|
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 |
Download | GitHub: Note: https://github.com/gaboflowers/EmailRegistrationFilter/blob/main/README.md |
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).
Installation
- Download and place the file(s) in a directory called
EmailRegistrationFilter
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'EmailRegistrationFilter' );
file: Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration parameters
Within the $IP/extensions/EmailRegistrationFilter/extension.json
file:
$wgPatternList
List of preg_match patterns to be tested against an email address.
$wgIsWhiteList
True only allows a registation if the email matches a pattern in the value. If false, the PatternList becomes a blacklist.
$wgErrorMessage
Custom error message for a rejected registration.
Example
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": [
"/.*@.*.edu$/",
"/.*@.*.int$/"
],
"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.