Auto Group Compatability...

Makes it possible for admin to create users from admin panel
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Auto Group Compatability...

Postby JKeats on Wed 28. Jan, 2004 21:02

I've have the latest version of this (admin add users) installed and it works great.

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?
JKeats
Poster
Poster
 
Posts: 7
Joined: Tue 05. Aug, 2003 18:27

Postby JKeats on Wed 28. Jan, 2004 22:58

nm... not sure what i did... but i tinkered with something and new users are being auto added to the proper group now.

thanks anyway... sorry for the post.
JKeats
Poster
Poster
 
Posts: 7
Joined: Tue 05. Aug, 2003 18:27


Return to Admin add users [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron