Advertisement:

Author Topic: How to select default primary membergroup?  (Read 2897 times)

Offline cambler

  • Semi-Newbie
  • *
  • Posts: 20
  • Gender: Male
  • I Run the Internet
    • GWC Gear
How to select default primary membergroup?
« 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?

Offline Spaceman-Spiff

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,524
  • Gender: Male
Re: How to select default primary membergroup?
« Reply #1 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.

Offline cambler

  • Semi-Newbie
  • *
  • Posts: 20
  • Gender: Male
  • I Run the Internet
    • GWC Gear
Re: How to select default primary membergroup?
« Reply #2 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.

Offline Spaceman-Spiff

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,524
  • Gender: Male
Re: How to select default primary membergroup?
« Reply #3 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.


Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,805
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: How to select default primary membergroup?
« Reply #4 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
But it's only for 1.1.*

You can try and update it or work out how to make the changes for 2.*
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]