phpBB

Code Changes

File: includes/ucp/ucp_register.php

  Unmodified   Added   Modified   Removed
Line 39Line 39
			trigger_error('UCP_REGISTER_DISABLE');
}


			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', '');
$user_lang = $request->variable('lang', $user->lang_name);

		$agreed			= $request->variable('agreed', false);
$submit = $request->is_set_post('submit');
$change_lang = $request->variable('change_lang', '');
$user_lang = $request->variable('lang', $user->lang_name);

 

if ($agreed && !check_form_key('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


/**
* Add UCP register data before they are assigned to the template or submitted

Line 67Line 78
		);
extract($phpbb_dispatcher->trigger_event('core.ucp_register_requests_after', compact($vars)));


		);
extract($phpbb_dispatcher->trigger_event('core.ucp_register_requests_after', compact($vars)));


		if ($agreed)
{

 
			add_form_key('ucp_register');

			add_form_key('ucp_register');

		}
else
{
add_form_key('ucp_register_terms');
}

 

if ($change_lang || $user_lang != $config['default_lang'])
{


if ($change_lang || $user_lang != $config['default_lang'])
{

Line 168Line 172

$template_vars = array(
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',


$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),


'S_SHOW_COPPA' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),