aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 3fb79ed5bb..4e943a2028 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -219,6 +219,34 @@ function user_add($user_row, $cp_data = false)
{
$cp_data['user_id'] = (int) $user_id;
+ switch (SQL_LAYER)
+ {
+ case 'oracle':
+ case 'firebird':
+ case 'postgres':
+ $right_delim = $left_delim = '"';
+ break;
+
+ case 'sqlite':
+ case 'mssql':
+ case 'mssql_odbc':
+ $right_delim = ']';
+ $left_delim = '[';
+ break;
+
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $right_delim = $left_delim = '`';
+ break;
+ }
+
+ foreach ($cp_data as $key => $value)
+ {
+ $cp_data[$right_delim . $key . $left_delim] = $value;
+ unset($cp_data[$key]);
+ }
+
if (!class_exists('custom_profile'))
{
include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);