phpBB

Code Changes

File: includes/ucp/ucp_profile.php

  Unmodified   Added   Modified   Removed
Line 98Line 98
					$passwords_manager = $phpbb_container->get('passwords.manager');

// Only check the new password against the previous password if there have been no errors

					$passwords_manager = $phpbb_container->get('passwords.manager');

// Only check the new password against the previous password if there have been no errors

					if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && $passwords_manager->check($data['new_password'], $user->data['user_password']))

					if (!count($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && $passwords_manager->check($data['new_password'], $user->data['user_password']))

					{
$error[] = 'SAME_PASSWORD_ERROR';
}

					{
$error[] = 'SAME_PASSWORD_ERROR';
}

Line 125Line 125
					$vars = array('data', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_reg_details_validate', compact($vars)));


					$vars = array('data', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_reg_details_validate', compact($vars)));


					if (!sizeof($error))

					if (!count($error))

					{
$sql_ary = array(
'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'],

					{
$sql_ary = array(
'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'],

Line 220Line 220
						$vars = array('data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_reg_details_sql_ary', compact($vars)));


						$vars = array('data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_reg_details_sql_ary', compact($vars)));


						if (sizeof($sql_ary))

						if (count($sql_ary))

						{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '

						{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '

Line 257Line 257
				}

$template->assign_vars(array(

				}

$template->assign_vars(array(

					'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',

					'ERROR'				=> (count($error)) ? implode('<br />', $error) : '',


'USERNAME' => $data['username'],
'EMAIL' => $data['email'],


'USERNAME' => $data['username'],
'EMAIL' => $data['email'],

Line 343Line 343
					// validate custom profile fields
$cp->submit_cp_field('profile', $user->get_iso_lang_id(), $cp_data, $cp_error);


					// validate custom profile fields
$cp->submit_cp_field('profile', $user->get_iso_lang_id(), $cp_data, $cp_error);


					if (sizeof($cp_error))

					if (count($cp_error))

					{
$error = array_merge($error, $cp_error);
}

					{
$error = array_merge($error, $cp_error);
}

Line 365Line 365
					$vars = array('data', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_validate_profile_info', compact($vars)));


					$vars = array('data', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_validate_profile_info', compact($vars)));


					if (!sizeof($error))

					if (!count($error))

					{
$data['notify'] = $user->data['user_notify_type'];


					{
$data['notify'] = $user->data['user_notify_type'];


Line 449Line 449
				}

$template->assign_vars(array(

				}

$template->assign_vars(array(

					'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',

					'ERROR'				=> (count($error)) ? implode('<br />', $error) : '',

					'S_JABBER_ENABLED'	=> $config['jab_enable'],
'JABBER' => $data['jabber'],
));

					'S_JABBER_ENABLED'	=> $config['jab_enable'],
'JABBER' => $data['jabber'],
));

Line 537Line 537
					'sig'
);


					'sig'
);


				if (sizeof($warn_msg))

				if (count($warn_msg))

				{
$error += $warn_msg;
}

				{
$error += $warn_msg;
}

Line 549Line 549
				}
else
{

				}
else
{

					if (!sizeof($error))

					if (!count($error))

					{
$user->optionset('sig_bbcode', $enable_bbcode);
$user->optionset('sig_smilies', $enable_smilies);

					{
$user->optionset('sig_bbcode', $enable_bbcode);
$user->optionset('sig_smilies', $enable_smilies);

Line 594Line 594
				$controller_helper = $phpbb_container->get('controller.helper');

$template->assign_vars(array(

				$controller_helper = $phpbb_container->get('controller.helper');

$template->assign_vars(array(

					'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',

					'ERROR'				=> (count($error)) ? implode('<br />', $error) : '',

					'SIGNATURE'			=> $decoded_message['text'],
'SIGNATURE_PREVIEW' => $signature_preview,


					'SIGNATURE'			=> $decoded_message['text'],
'SIGNATURE_PREVIEW' => $signature_preview,


Line 753Line 753
				$avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true);

$template->assign_vars(array(

				$avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true);

$template->assign_vars(array(

					'ERROR'			=> (sizeof($error)) ? implode('<br />', $error) : '',

					'ERROR'			=> (count($error)) ? implode('<br />', $error) : '',

					'AVATAR'		=> $avatar,

'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',

					'AVATAR'		=> $avatar,

'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',

Line 778Line 778
						$error[] = 'FORM_INVALID';
}


						$error[] = 'FORM_INVALID';
}


					if (!sizeof($error))

					if (!count($error))

					{
if (!empty($keys))
{

					{
if (!empty($keys))
{

Line 825Line 825
		}

$template->assign_vars(array(

		}

$template->assign_vars(array(

			'ERROR'		=> (sizeof($error)) ? implode('<br />', $error) : '',

			'ERROR'		=> (count($error)) ? implode('<br />', $error) : '',


'L_TITLE' => $user->lang['UCP_PROFILE_' . strtoupper($mode)],



'L_TITLE' => $user->lang['UCP_PROFILE_' . strtoupper($mode)],