1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Merge pull request #4993 from Deltik/fix/4991

Fixes #4991: Improper array access in sc_signup_extended_user_fields
This commit is contained in:
Cameron 2023-04-21 11:24:38 -07:00 committed by GitHub
commit 198d0cff6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -520,6 +520,7 @@ class signup_shortcodes extends e_shortcode
{
$opts = $parm;
$required = (int) $ext['user_extended_struct_required'];
$edit = isset($_POST['ue']['user_' . $ext['user_extended_struct_name']]) ? $_POST['ue']['user_' . $ext['user_extended_struct_name']] : '';
if($required === 0) // "No - Will not show on Signup page".
{
@ -545,7 +546,7 @@ class signup_shortcodes extends e_shortcode
$replace = array(
$label,
($required === 1 ? $this->sc_signup_is_mandatory('true') : ''),
$ue->renderElement($ext, varset($_POST['ue']['user_' . $ext['user_extended_struct_name']]), $opts)
$ue->renderElement($ext, $edit, $opts)
);
$text .= str_replace($search, $replace, $this->template['extended-user-fields']);