diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-07-22 22:00:27 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-07-22 22:20:55 +0200 |
commit | 974da6449c2f18f52086bd5ee6d24aafed046e37 (patch) | |
tree | 6dac9a841c44e866d038f0550a381813ca483bc0 /phpBB | |
parent | 8efca016fad58e122f15e8eb2eaa1ea5aad6f809 (diff) | |
download | forums-974da6449c2f18f52086bd5ee6d24aafed046e37.tar forums-974da6449c2f18f52086bd5ee6d24aafed046e37.tar.gz forums-974da6449c2f18f52086bd5ee6d24aafed046e37.tar.bz2 forums-974da6449c2f18f52086bd5ee6d24aafed046e37.tar.xz forums-974da6449c2f18f52086bd5ee6d24aafed046e37.zip |
[ticket/11723] Correctly redirect user to agreement page and let him leave
This patch consists of two changes. The first one will make sure that $agree
is correctly reset to 0 and the user redirected back to the agreement page
after changing the display language. Secondly, by reseting 'change_lang',
the user will be able to agree to the terms on the agreement page again.
The changed language will still be kept, as this is correctly saved in the
'lang' field that is passed to the ucp_register page.
The variable $agree has also been changed to be boolean. It is not used as
an integer anywere in the ucp_register file.
PHPBB3-11723
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 70fbfe46fb..7bc7ac8191 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -38,7 +38,7 @@ class ucp_register include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false; - $agreed = (int) $request->variable('agreed', false); + $agreed = $request->variable('agreed', false); $submit = $request->is_set_post('submit'); $change_lang = request_var('change_lang', ''); $user_lang = request_var('lang', $user->lang_name); @@ -63,7 +63,7 @@ class ucp_register $submit = false; // Setting back agreed to let the user view the agreement in his/her language - $agreed = ($request->variable('change_lang', false)) ? 0 : $agreed; + $agreed = false; } $user->lang_name = $user_lang = $use_lang; @@ -89,7 +89,7 @@ class ucp_register $add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : ''; $s_hidden_fields = array( - 'change_lang' => $change_lang, + 'change_lang' => '', ); // If we change the language, we want to pass on some more possible parameter. |