But i'd also like any new users to be auto added to a usergroup. I've tried niels auto group hack and it doesn't work with this hack (i.e. when i add a user from the ACP, they aren't auto added to the group i set).
Neils auto group hack is more detailed even that i need. Something like the following would work just fine... but I'm not sure where I sould need to add it (or if this code is okay even for use with the admin add users hack)...
- Code: Select all
#
#-----OPEN
#
includes/usercp_register.php
#
#-----FIND
#
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($group_id, '', 'Personal User', 1, 0)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql);
}
#
#-----AFTER, ADD
#
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($user_id, ".$board_config['initial_group_id'].", 0)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql);
#
#----- Then run this SQL.
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ( 'initial_group_id', '1');
#
#-----Change the 1 to the value of the usergroup you want as default.
#
Anyone have any ideas?

