mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
do not end up with an error if no profile fields defined...
git-svn-id: file:///svn/phpbb/trunk@4755 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -268,6 +268,8 @@ class ucp_profile extends module
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Update Custom Fields
|
||||
if (sizeof($cp_data))
|
||||
{
|
||||
$sql = 'UPDATE phpbb_profile_fields_data
|
||||
SET ' . $db->sql_build_array('UPDATE', $cp_data) . '
|
||||
WHERE user_id = ' . $user->data['user_id'];
|
||||
@@ -279,6 +281,7 @@ class ucp_profile extends module
|
||||
$db->sql_query('INSERT INTO phpbb_profile_fields_data ' . $db->sql_build_array('INSERT', $cp_data));
|
||||
$db->return_on_error = false;
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode");
|
||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$mode\">", '</a>');
|
||||
|
@@ -190,9 +190,12 @@ class ucp_register extends module
|
||||
$user_id = $db->sql_nextid();
|
||||
|
||||
// Insert Custom Profile Fields
|
||||
if (sizeof($cp_data))
|
||||
{
|
||||
$cp_data['user_id'] = (int) $user_id;
|
||||
$sql = 'INSERT INTO phpbb_profile_fields_data ' . $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Place into appropriate group, either REGISTERED(_COPPA) or INACTIVE(_COPPA) depending on config
|
||||
$group_reg = ($coppa) ? 'REGISTERED_COPPA' : 'REGISTERED';
|
||||
|
Reference in New Issue
Block a user