From 0bc2f9f2423532f813039143d1e7a138008c58d7 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 23 Mar 2015 17:52:17 -0700 Subject: [PATCH] [ticket/13698] Pass parameters for link in LOGIN_ERROR_PASSWORD error message. LOGIN_ERROR_PASSWORD may be returned as the message if the password is invalid while hitting the LOGIN_ERROR_ATTEMPTS error. PHPBB3-13698 --- phpBB/includes/functions.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index acb4690a48..573df9e55d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2920,19 +2920,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa // Special cases... determine switch ($result['status']) { - case LOGIN_ERROR_ATTEMPTS: - - $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']); - $captcha->init(CONFIRM_LOGIN); - // $captcha->reset(); - - $template->assign_vars(array( - 'CAPTCHA_TEMPLATE' => $captcha->get_template(), - )); - - $err = $user->lang[$result['error_msg']]; - break; - case LOGIN_ERROR_PASSWORD_CONVERT: $err = sprintf( $user->lang[$result['error_msg']], @@ -2943,6 +2930,17 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa ); break; + case LOGIN_ERROR_ATTEMPTS: + + $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']); + $captcha->init(CONFIRM_LOGIN); + // $captcha->reset(); + + $template->assign_vars(array( + 'CAPTCHA_TEMPLATE' => $captcha->get_template(), + )); + // no break; + // Username, password, etc... default: $err = $user->lang[$result['error_msg']];