diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-12-06 07:20:34 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-12-06 07:20:34 +0100 |
commit | 3009e7ffbe2fae722995db5a419a04eeba810d71 (patch) | |
tree | 0e8371bbfbdf63b6656e360a7e0d37043a74d4d6 /phpBB/includes | |
parent | d7425b4998d68b51ecee543d2b77d9d5ed17cbd7 (diff) | |
parent | 1f00e160ab69b2a709793abc1829cc6e91e07b93 (diff) | |
download | forums-3009e7ffbe2fae722995db5a419a04eeba810d71.tar forums-3009e7ffbe2fae722995db5a419a04eeba810d71.tar.gz forums-3009e7ffbe2fae722995db5a419a04eeba810d71.tar.bz2 forums-3009e7ffbe2fae722995db5a419a04eeba810d71.tar.xz forums-3009e7ffbe2fae722995db5a419a04eeba810d71.zip |
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 694aaf1351..00fa8034f9 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -39,7 +39,8 @@ class ucp_register trigger_error('UCP_REGISTER_DISABLE'); } - $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false; + $coppa = $request->is_set('coppa_yes') ? 1 : ($request->is_set('coppa_no') ? 0 : false); + $coppa = $request->is_set('coppa') ? $request->variable('coppa', 0) : $coppa; $agreed = $request->variable('agreed', false); $submit = $request->is_set_post('submit'); $change_lang = $request->variable('change_lang', ''); @@ -50,6 +51,11 @@ class ucp_register $agreed = false; } + if ($coppa !== false && !check_form_key('ucp_register')) + { + $coppa = false; + } + /** * Add UCP register data before they are assigned to the template or submitted * @@ -166,11 +172,8 @@ class ucp_register $template_vars = array( 'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '', - 'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday), - 'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday), - - 'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0'), - 'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1'), + 'L_COPPA_NO' => $user->lang('UCP_COPPA_BEFORE', $coppa_birthday), + 'L_COPPA_YES' => $user->lang('UCP_COPPA_ON_AFTER', $coppa_birthday), 'S_SHOW_COPPA' => true, 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), |