Bläddra i källkod

! Don't call spamProtection when coming from the "Choose a password reminder type" page (fixes #791).

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 år sedan
förälder
incheckning
2ad4b357b5
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      Sources/Reminder.php

+ 5 - 1
Sources/Reminder.php

@@ -72,7 +72,11 @@ function RemindPick()
 		fatal_lang_error('username_no_exist', false);
 
 	// Make sure we are not being slammed
-	spamProtection('remind');
+	// Don't call this if you're coming from the "Choose a reminder type" page - otherwise you'll likely get an error
+	if (!isset($_POST['reminder_type']) || !in_array($_POST['reminder_type'], array('email', 'secret')))
+	{
+		spamProtection('remind');
+	}
 
 	// Find the user!
 	$request = $smcFunc['db_query']('', '