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…') |
|||
Line 1: | Line 1: | ||
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. | 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 $ | + | This is implemented as a <tt>$wgHooks</tt> and function call directly in <tt>LocalSettings.php</tt>. 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: | The code in use is: |
Latest revision as of 07:55, 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 $wgHooks 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; }