From c6e9bd13a75441e9b35a1bfa5d2a08cc38ff1fa5 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 26 Jan 2013 01:01:57 +0530 Subject: [PATCH] [ticket/10325] trigger error if forgot password option disabled PHPBB3-10325 --- phpBB/includes/ucp/ucp_remind.php | 5 +++++ phpBB/language/en/ucp.php | 1 + 2 files changed, 6 insertions(+) diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 8a7ba5d0ca..dd95c29def 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -29,6 +29,11 @@ class ucp_remind global $config, $phpbb_root_path, $phpEx; global $db, $user, $auth, $template; + if (!$config['allow_forgot_password']) + { + trigger_error('UCP_FORGOT_PASSWORD_DISABLE'); + } + $username = request_var('username', '', true); $email = strtolower(request_var('email', '')); $submit = (isset($_POST['submit'])) ? true : false; diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 3e090a8aec..a98dc6f11e 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -521,6 +521,7 @@ $lang = array_merge($lang, array( 'UCP_USERGROUPS_MEMBER' => 'Edit memberships', 'UCP_USERGROUPS_MANAGE' => 'Manage groups', + 'UCP_FORGOT_PASSWORD_DISABLE' => 'Function has been disabled.', 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.', 'UCP_REMIND' => 'Send password', 'UCP_RESEND' => 'Send activation email',