Text Formatted Code
// outside all functions
include_once $_CONF['path'] . 'system/lib-user.php';
// inside CUSTOM_userCreate
$grpid = DB_getItem ($_TABLES['groups'], 'grp_id', "grp_name='". $your_group_name ."'");
USER_addGroup($grpid, $uid);
In general there should be a function for most things you want to do with tables directly and it is better not to hit the tables directly if you can help it.