Extension talk:CheckEmailAddress
Add topicWarning: Wrong parameter count for stristr() in /home/ejempl/public_html/wiki/extensions/CheckEmailAddress/CheckEmailAddress.hooks.php --79.156.43.41 21:28, 3 February 2012 (UTC) Can anyone fix this CheckEmailAddress.hooks.php in line 47? --79.156.43.41 21:45, 3 February 2012 (UTC)
- Done. CheckEmailAddress now compatible with PHP < 5.3.
- --Naitsirk 15:53, 4 February 2012 (UTC)
- OK, perfect --88.17.115.8 07:14, 6 February 2012 (UTC)
Very useful extension for my taste, because bots with email like aaa.bb.cc.dddd.ee@gmail.com attacked my wiki. But with option:
wgCheckEmailAddressNameSigns = array(
array(
'sign' => ".",
'maxcount' => 5,
),
);
I can't register at all. --91.192.82.106 05:42, 14 February 2012 (UTC)
- That's strange. Works without problems for me. What version of MediaWiki are you using? And I suppose the missing "$" before the wgCheckEmailAddressNameSigns-variable is just a typo?
- --Naitsirk (talk) 15:19, 29 February 2012 (UTC)
- It seems, it doesn't work together with ConfirmEdit extension.
Blacklist source?
[edit]Is there a good source for finding domain names of disposable email providers? I'm having a hard time finding a very basic list. The only thing popping up constantly are shady webservices wanting money for grabbing email address "verifications". Ha... Thx
Rule: only email adresses containing xyz can register
[edit]Is something like that possible with this extension? I don't want to restrict certain email adresses but restrict all. Only users with adresses from my university should be allowed to register. --DMR (talk) 08:05, 17 August 2012 (UTC)
- I realize this is an old question, but I have a similar requirement and it seems to me it can be done by reversing the logic of the function abortNewAccountDomain: the blacklist becomes a whitelist and the function only returns true if the domain of the new email address is in the whitelist:
public static function abortNewAccountDomain ( $user, &$abortError ) { global $wgUser, $wgCheckEmailAddressDomainSources; $fulladdress = $user->getEmail(); $domainat = stristr( $fulladdress, '@' ); $domain = mb_strtolower( $domainat ); if( !is_array( $wgCheckEmailAddressDomainSources ) || count( $wgCheckEmailAddressDomainSources ) <= 0 ) { return ''; } if( $wgCheckEmailAddressDomainSources[ 'type' ] == CEASRC_FILE ) { $srcfile = $wgCheckEmailAddressDomainSources[ 'src' ]; if( file_exists( $srcfile ) ) { $domlines = file( $srcfile ); } else { $abortError = wfMsg( 'checkemailaddress-domainerror' ); return false; } foreach( $domlines as $domline ) { $domline = rtrim( $domline, "\r\n"); $entry = "/@".$domline."/"; if( preg_match( $entry, $domain ) ) { unset( $domline ); return true; } } } $abortError = wfMsg( 'checkemailaddress-domainerror' ); unset( $domline ); return false; }
- --Beyondexcess (talk) 15:08, 2 March 2016 (UTC)
Using regular expressions/wildcards
[edit]I noticed some odd behavior when trying to block strings that contain wildcard characters. I wanted to block all domains that contain the word "blog" and so added the line "*blog*" to the Blacklistfile. This addition however causes similar but unrelated strings to be blocked as well. For example, I attempted to test registration using "testuser@blork.com" but had this domain blocked. Removing the "*blog*" line from the Blacklistfile allows users with the "@blork.com" domain to register as expected.
I made a replacement
[edit]Given that the Manual:Hooks/AbortNewAccount hook was removed in 1.33.
Here: Extension:EmailRegistrationFilter.
Thought someone might've wanted to know.