Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: cambler on April 29, 2008, 06:48:44 PM

Title: How to select default primary membergroup?
Post by: cambler on April 29, 2008, 06:48:44 PM
This is likely a completely n00b question - I've created a membergroup called "newbies" that I'd like all newly-registered users to be placed in once they're activated.

How do I go about setting this?
Title: Re: How to select default primary membergroup?
Post by: Spaceman-Spiff on April 29, 2008, 07:56:51 PM
Why not just let it use the "Newbie" Post count based groups? That one is available by default.
Title: Re: How to select default primary membergroup?
Post by: cambler on April 29, 2008, 08:08:55 PM
Why not just let it use the "Newbie" Post count based groups? That one is available by default.

Because I'm going to create a cron job to move users out of the "Newbie" group after they've been using the forum for 30 days. The "Newbie" group is going to be restricted to not allow new users to start new topics, so using a post-count group doesn't make much sense.
Title: Re: How to select default primary membergroup?
Post by: Spaceman-Spiff on April 29, 2008, 08:32:00 PM
I see...

I'm not sure if there's any such feature, however, you can edit it manually in Sources/Subs-Members.php:

Search for:
Code: [Select]
// Register them into the database.
$smcFunc['db_insert']('',
'{db_prefix}members',
$column_names,
$values,
array('id_member')
);

Add before:
Code: [Select]
$column_names['id_group'] = 'int';
$values['id_group'] = 9;

Change 9 to whatever the group ID is.

Title: Re: How to select default primary membergroup?
Post by: Rumbaar on May 04, 2008, 08:07:10 PM
I know there was a mod that allowed for you to set the default membergroup for all new members:
Default Membergroup on Registration (http://custom.simplemachines.org/mods/index.php?mod=819)
But it's only for 1.1.*

You can try and update it or work out how to make the changes for 2.*