aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-02-13 16:28:37 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-02-13 16:28:37 +0000
commitd7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1 (patch)
tree522d22fa5bfe582f1ad18aabe3df62e8dc71c7da /phpBB/includes/functions_user.php
parentbd31cb634d545edb0cf17e58962004d6830f3537 (diff)
downloadforums-d7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1.tar
forums-d7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1.tar.gz
forums-d7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1.tar.bz2
forums-d7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1.tar.xz
forums-d7c5f502b4e0ef87a1d4a8d9a4fc16c79b3a5dc1.zip
Fixing converter bugs.
#21215 #18575 #18435 #16565 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8379 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8782460ecf..55cf45505e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -143,7 +143,11 @@ function user_update_name($old_name, $new_name)
}
/**
-* Add User
+* Adds an user
+*
+* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
+* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
+* @return: the new user's ID.
*/
function user_add($user_row, $cp_data = false)
{
@@ -281,7 +285,7 @@ function user_add($user_row, $cp_data = false)
$sql = 'SELECT group_colour
FROM ' . GROUPS_TABLE . '
- WHERE group_id = ' . $user_row['group_id'];
+ WHERE group_id = ' . (int) $user_row['group_id'];
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);