Difference between revisions of "Help:Block email"
From Apache OpenOffice Wiki
(Created page with 'To help combat Spam registrations, one-time-use or throw-away email services are blocked. If a user attempts to register a new account using one of these email services, they re…') |
(No difference)
|
Revision as of 07:53, 10 December 2010
To help combat Spam registrations, one-time-use or throw-away email services are blocked. If a user attempts to register a new account using one of these email services, they receive an error stating that these mail services are forbidden on the OpenOffice.org Wiki.
This is implemented as a $wgHook and function call directly in LocalSettings.php. It can be expanded (if new email services need to be blocked) by adding the service names in the function.
The code in use is:
############################################# # Hook to block one-time-use email services # ############################################# $wgHooks['AbortNewAccount'][] = 'noMailinator'; function noMailinator( $user, &$message ) { if( preg_match( '/@(mailinator|binkmail)\.com/i', $user->getEmail() )) { $message = 'One-time-use email services are forbidden on the OpenOffice.org Wiki'; return false; } return true; }