aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_register.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp/ucp_register.php')
-rw-r--r--phpBB/includes/ucp/ucp_register.php37
1 files changed, 31 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 3d70c42256..a7a93d6115 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -527,7 +527,6 @@ class ucp_register
{
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
}
- $s_hidden_fields = build_hidden_fields($s_hidden_fields);
// Visual Confirmation - Show images
if ($config['enable_confirm'])
@@ -553,8 +552,7 @@ class ucp_register
// Assign template vars for timezone select
phpbb_timezone_select($template, $user, $data['tz'], true);
- $template->assign_vars(array(
- 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ $template_vars = array(
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
'PASSWORD_CONFIRM' => $data['password_confirm'],
@@ -569,13 +567,41 @@ class ucp_register
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
'S_REGISTRATION' => true,
'S_COPPA' => $coppa,
- 'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
'COOKIE_NAME' => $config['cookie_name'],
'COOKIE_PATH' => $config['cookie_path'],
+ );
+
+ $tpl_name = 'ucp_register';
+
+ /**
+ * Modify template data on the registration page
+ *
+ * @event core.ucp_register_modify_template_data
+ * @var array template_vars Array with template data
+ * @var array data Array with user data, read only
+ * @var array error Array with errors
+ * @var array s_hidden_fields Array with hidden field elements
+ * @var string tpl_name Template name
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'data',
+ 'error',
+ 's_hidden_fields',
+ 'tpl_name',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_register_modify_template_data', compact($vars)));
+
+ $template_vars = array_merge($template_vars, array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
));
+ $template->assign_vars($template_vars);
+
//
$user->profile_fields = array();
@@ -583,8 +609,7 @@ class ucp_register
$cp->generate_profile_fields('register', $user->get_iso_lang_id());
//
- $this->tpl_name = 'ucp_register';
- $this->page_title = 'UCP_REGISTRATION';
+ $this->tpl_name = $tpl_name;
}
/**