com web/php: Disable another annoying user: submit-event.php

From: Date: Fri, 31 Dec 2010 05:51:57 +0000
Subject: com web/php: Disable another annoying user: submit-event.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-23696@lists.php.net to get a copy of this message
Commit: 57bafcd47c8b790b7787885a4f3f6d37951d7934 Author: Philip Olson <philip@php.net> Fri, 31 Dec 2010 05:51:57 +0000 Parents: e3415a335c2cb36565cd5706d789db398cf43b3b Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=57bafcd47c8b790b7787885a4f3f6d37951d7934 Log: Disable another annoying user Changed paths: M submit-event.php Diff: diff --git a/submit-event.php b/submit-event.php index e4abad8..3761ad7 100644 --- a/submit-event..php +++ b/submit-event.php @@ -44,9 +44,11 @@ if ($process) { $errors[] = 'You must supply a valid email address.'; } - // Temporary lockout on one annoying poster. - if (strtolower($_POST['email']) == 'saradhaaa@gmail.com') { - $errors[] = 'Enough is enough. Go play somewhere else.'; + // Temporary lockout of annoying users (better solution is needed) + $uemail = isset($_POST['email']) ? strtolower($_POST['email']) : ''; + $mosquitoes = array('saradhaaa@gmail.com', 'mg-tuzi@yahoo.com.cn'); + if (in_array($uemail, $mosquitoes)) { + $errors[] = 'Sorry an error has occurred, please try again later.'; } $_POST['sdesc'] = trim($_POST['sdesc']);

« previous php.webmaster (#23696) next »