From 18aa4e4ecd55b846ead8e15853164bb5742099ef Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 15 Dec 2011 15:13:11 +0000 Subject: [PATCH 1/6] [ticket/10535] Remove email confirm check on registration form PHPBB3-10535 --- phpBB/includes/ucp/ucp_register.php | 9 --------- phpBB/styles/prosilver/template/ucp_register.html | 4 ---- phpBB/styles/subsilver2/template/ucp_register.html | 4 ---- 3 files changed, 17 deletions(-) diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index fe09d0a9fe..56efc4706f 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -100,7 +100,6 @@ class ucp_register $s_hidden_fields = array_merge($s_hidden_fields, array( 'username' => utf8_normalize_nfc(request_var('username', '', true)), 'email' => strtolower(request_var('email', '')), - 'email_confirm' => strtolower(request_var('email_confirm', '')), 'lang' => $user->lang_name, 'tz' => request_var('tz', (float) $config['board_timezone']), )); @@ -189,7 +188,6 @@ class ucp_register 'new_password' => request_var('new_password', '', true), 'password_confirm' => request_var('password_confirm', '', true), 'email' => strtolower(request_var('email', '')), - 'email_confirm' => strtolower(request_var('email_confirm', '')), 'lang' => basename(request_var('lang', $user->lang_name)), 'tz' => request_var('tz', (float) $timezone), ); @@ -208,7 +206,6 @@ class ucp_register 'email' => array( array('string', false, 6, 60), array('email')), - 'email_confirm' => array('string', false, 6, 60), 'tz' => array('num', false, -14, 14), 'lang' => array('language_iso_name'), )); @@ -253,11 +250,6 @@ class ucp_register { $error[] = $user->lang['NEW_PASSWORD_ERROR']; } - - if ($data['email'] != $data['email_confirm']) - { - $error[] = $user->lang['NEW_EMAIL_ERROR']; - } } if (!sizeof($error)) @@ -472,7 +464,6 @@ class ucp_register 'PASSWORD' => $data['new_password'], 'PASSWORD_CONFIRM' => $data['password_confirm'], 'EMAIL' => $data['email'], - 'EMAIL_CONFIRM' => $data['email_confirm'], 'L_REG_COND' => $l_reg_cond, 'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])), diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index dd0e5ad02a..30ed37eecc 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -38,10 +38,6 @@
-
-
-
-

{L_PASSWORD_EXPLAIN}
diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html index ad6fb8d056..0c3533292d 100644 --- a/phpBB/styles/subsilver2/template/ucp_register.html +++ b/phpBB/styles/subsilver2/template/ucp_register.html @@ -41,10 +41,6 @@ {L_EMAIL_ADDRESS}: - - {L_CONFIRM_EMAIL}: - - {L_PASSWORD}:
{L_PASSWORD_EXPLAIN} From d73c3a297e1f31320c054685d5e38cb72a6357f3 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 15 Dec 2011 23:15:24 +0000 Subject: [PATCH 2/6] [ticket/10535] Removed email confirm from UCP, removed unused language entries PHPBB3-10535 --- phpBB/includes/ucp/ucp_profile.php | 7 ------- phpBB/language/en/ucp.php | 4 ---- .../styles/prosilver/template/ucp_profile_reg_details.html | 6 ------ 3 files changed, 17 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 6eb11e6e59..2bc438e042 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -47,7 +47,6 @@ class ucp_profile $data = array( 'username' => utf8_normalize_nfc(request_var('username', $user->data['username'], true)), 'email' => strtolower(request_var('email', $user->data['user_email'])), - 'email_confirm' => strtolower(request_var('email_confirm', '')), 'new_password' => request_var('new_password', '', true), 'cur_password' => request_var('cur_password', '', true), 'password_confirm' => request_var('password_confirm', '', true), @@ -66,7 +65,6 @@ class ucp_profile 'email' => array( array('string', false, 6, 60), array('email')), - 'email_confirm' => array('string', true, 6, 60), ); if ($auth->acl_get('u_chgname') && $config['allow_namechange']) @@ -79,11 +77,6 @@ class ucp_profile $error = validate_data($data, $check_ary); - if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email']) - { - $error[] = ($data['email_confirm']) ? 'NEW_EMAIL_ERROR' : 'NEW_EMAIL_CONFIRM_EMPTY'; - } - if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password']) { $error[] = ($data['password_confirm']) ? 'NEW_PASSWORD_ERROR' : 'NEW_PASSWORD_CONFIRM_EMPTY'; diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 59e5cb1952..227b1c92a3 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -123,8 +123,6 @@ $lang = array_merge($lang, array( 'CLICK_RETURN_FOLDER' => '%1$sReturn to your ā€œ%3$sā€ folder%2$s', 'CONFIRMATION' => 'Confirmation of registration', 'CONFIRM_CHANGES' => 'Confirm changes', - 'CONFIRM_EMAIL' => 'Confirm e-mail address', - 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.', 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', 'VC_REFRESH' => 'Refresh confirmation code', 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.', @@ -283,8 +281,6 @@ $lang = array_merge($lang, array( 'MOVE_TO_FOLDER' => 'Move to folder', 'MOVE_UP' => 'Move up', - 'NEW_EMAIL_CONFIRM_EMPTY' => 'You did not enter a confirm e-mail address.', - 'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.', 'NEW_FOLDER_NAME' => 'New folder name', 'NEW_PASSWORD' => 'New password', 'NEW_PASSWORD_CONFIRM_EMPTY' => 'You did not enter a confirm password.', diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html index 9c3e98d053..9d4a9e3463 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html +++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html @@ -20,12 +20,6 @@
{EMAIL}
- -
-

{L_CONFIRM_EMAIL_EXPLAIN}
-
-
-

{L_CHANGE_PASSWORD_EXPLAIN}
From fd58a0ad374cfd535b0aff2f4bf1564a479fcdd0 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 15 Dec 2011 23:17:21 +0000 Subject: [PATCH 3/6] [ticket/10535] Forgot a subsilver2 change. *doh* PHPBB3-10535 --- .../styles/subsilver2/template/ucp_profile_reg_details.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html index 1b1c28fa3b..96e2e26683 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html @@ -22,12 +22,6 @@ {L_EMAIL_ADDRESS}: {EMAIL} - - - {L_CONFIRM_EMAIL}:
{L_CONFIRM_EMAIL_EXPLAIN} - - - {L_NEW_PASSWORD}:
{L_CHANGE_PASSWORD_EXPLAIN} From 4baa2bb52c47b0b0e316c3a25f34e7bc27075ffd Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 23 Dec 2011 21:55:49 +0000 Subject: [PATCH 4/6] [ticket/10535] Removed email confirm field from acp_users module PHPBB3-10535 --- phpBB/adm/style/acp_users_overview.html | 4 ---- phpBB/includes/acp/acp_users.php | 7 ------- 2 files changed, 11 deletions(-) diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index 9237e45daf..1f10e7f66e 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -45,10 +45,6 @@
-
-

{L_CONFIRM_EMAIL_EXPLAIN}
-
-

{L_CHANGE_PASSWORD_EXPLAIN}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index c1ad28ca14..cf5650a901 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -757,7 +757,6 @@ class acp_users 'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)), 'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0), 'email' => strtolower(request_var('user_email', $user_row['user_email'])), - 'email_confirm' => strtolower(request_var('email_confirm', '')), 'new_password' => request_var('new_password', '', true), 'password_confirm' => request_var('password_confirm', '', true), ); @@ -789,7 +788,6 @@ class acp_users array('string', false, 6, 60), array('email', $user_row['user_email']) ), - 'email_confirm' => array('string', true, 6, 60) ); } @@ -800,11 +798,6 @@ class acp_users $error[] = 'NEW_PASSWORD_ERROR'; } - if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email']) - { - $error[] = 'NEW_EMAIL_ERROR'; - } - if (!check_form_key($form_name)) { $error[] = 'FORM_INVALID'; From fc297a710e56d938afce83de401b103c72218a1b Mon Sep 17 00:00:00 2001 From: p Date: Fri, 23 Dec 2011 22:10:34 +0000 Subject: [PATCH 5/6] [ticket/10535] Delete email confirm from installer PHPBB3-10535 --- phpBB/install/install_install.php | 23 +++++++------------ phpBB/language/en/install.php | 1 - .../phpbb_functional_test_case.php | 3 +-- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 21fe355447..cfef1861cf 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -690,7 +690,7 @@ class install_install extends module $error = array(); // Check the entered email address and password - if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '') + if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email'] == '') { $error[] = $lang['INST_ERR_MISSING_DATA']; } @@ -722,12 +722,7 @@ class install_install extends module $error[] = $lang['INST_ERR_PASSWORD_TOO_LONG']; } - if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '') - { - $error[] = $lang['INST_ERR_EMAIL_MISMATCH']; - } - - if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1'])) + if ($data['board_email'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email'])) { $error[] = $lang['INST_ERR_EMAIL_INVALID']; } @@ -1251,11 +1246,11 @@ class install_install extends module WHERE config_name = 'server_port'", 'UPDATE ' . $data['table_prefix'] . "config - SET config_value = '" . $db->sql_escape($data['board_email1']) . "' + SET config_value = '" . $db->sql_escape($data['board_email']) . "' WHERE config_name = 'board_email'", 'UPDATE ' . $data['table_prefix'] . "config - SET config_value = '" . $db->sql_escape($data['board_email1']) . "' + SET config_value = '" . $db->sql_escape($data['board_email']) . "' WHERE config_name = 'board_contact'", 'UPDATE ' . $data['table_prefix'] . "config @@ -1315,7 +1310,7 @@ class install_install extends module WHERE config_name = 'avatar_salt'", 'UPDATE ' . $data['table_prefix'] . "users - SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "' + SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "' WHERE username = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "moderator_cache @@ -1831,7 +1826,7 @@ class install_install extends module $messenger->template('installed', $data['language']); - $messenger->to($data['board_email1'], $data['admin_name']); + $messenger->to($data['board_email'], $data['admin_name']); $messenger->anti_abuse_headers($config, $user); @@ -1890,8 +1885,7 @@ class install_install extends module 'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)), 'admin_pass1' => request_var('admin_pass1', '', true), 'admin_pass2' => request_var('admin_pass2', '', true), - 'board_email1' => strtolower(request_var('board_email1', '')), - 'board_email2' => strtolower(request_var('board_email2', '')), + 'board_email' => strtolower(request_var('board_email', '')), 'img_imagick' => request_var('img_imagick', ''), 'ftp_path' => request_var('ftp_path', ''), 'ftp_user' => request_var('ftp_user', ''), @@ -1930,8 +1924,7 @@ class install_install extends module 'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => true), 'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true), 'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false), - 'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false), - 'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false), + 'board_email' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false), ); var $advanced_config_options = array( 'legend1' => 'ACP_EMAIL_SETTINGS', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 57a5de07eb..2ceb14a3d8 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -72,7 +72,6 @@ $lang = array_merge($lang, array( 'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.', 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for ā€œ%sā€ is empty.', 'CONFIG_RETRY' => 'Retry', - 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail', 'CONTINUE_CONVERT' => 'Continue conversion', 'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.', 'CONTINUE_LAST' => 'Continue last statements', diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 63b9d52bf0..9c9fa4fcee 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -102,8 +102,7 @@ class phpbb_functional_test_case extends phpbb_test_case 'admin_name' => 'admin', 'admin_pass1' => 'admin', 'admin_pass2' => 'admin', - 'board_email1' => 'nobody@example.com', - 'board_email2' => 'nobody@example.com', + 'board_email' => 'nobody@example.com', )); $parseURL = parse_url(self::$config['phpbb_functional_url']); From ccf0cf649daabc600e8a79680e29c7bfbba32cac Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 3 Feb 2012 15:55:44 -0500 Subject: [PATCH 6/6] [ticket/10535] Delete no longer needed email confirm language entries. PHPBB3-10535 --- phpBB/language/en/common.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index b51d34335f..bec4bd9ef7 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -614,7 +614,6 @@ $lang = array_merge($lang, array( 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.', 'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.', - 'TOO_LONG_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too long.', 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.', 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.', @@ -636,7 +635,6 @@ $lang = array_merge($lang, array( 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.', 'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.', - 'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.', 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.',