MyBB Community Forums

Full Version: Change Default Usergroup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a plugin that changes the main usergroup a user is put into when they register?

Also I know there is one on MyBB Central but I can't buy anything online.
Not a plugin. A solution also. Find in member.php
	if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->input['coppa'] == 1)
	{
		$usergroup = 5;
	}
	else
	{
		$usergroup = 2;
	}

find too:
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

Replace 2 with usergroup item you want.
Hi,

I am brand new to MyBB. Just got it setup this past Sunday.

That didn't seem to work for me. I changed the number "2" to "BlogNot" which is a group I created in MyBB. I got a php error.

Does this work in MyBB version 1.4.11 ?

Also - Does this "change the default group" or does it add the newly registered user to a "second group"?

Regards,
Terry
(2010-02-23, 11:16 PM)tbrothers Wrote: [ -> ]Hi,

I am brand new to MyBB. Just got it setup this past Sunday.

That didn't seem to work for me. I changed the number "2" to "BlogNot" which is a group I created in MyBB. I got a php error.

Does this work in MyBB version 1.4.11 ?

Also - Does this "change the default group" or does it add the newly registered user to a "second group"?

Regards,
Terry

You have to use the Group ID not the name of the group.
I have been looking but cannot find a "group id". I figured I was missing it so I've been searching the MyBB forum ... but haven't yet found out where to fingd the id.

Can you point me in the right direction?

Thanks!
Terry
It in is your Admin panel. It has a number after the group, I am guessing off the top of my head 6 or 7 would it be it. Look for one.
Honestly, no number! But that's okay ... I can figure it out from here. Im guessing that since the first group is Guests and the second group is Registered Users, etc. that they are numbered 1 and 2 etc. respectively.

But I swear there isn't a number. I edit the group and look in there and still no number. But again, I got it now.

Thank you for your help and have a Great evening!!

Regards,
Terry
Go to the Groups page in the ACP, hover over the group you want to know the ID of and it will show at the end of the URL in the task bar, or click the group and it will show in the address bar. (..../admin/index.php?module=user/groups&action=edit&gid=15)

That's the number you need. Smile
Guests are 0.

PM me a test admin account and forum URL. I will tell you..
(2010-02-24, 12:08 AM)Mark.M Wrote: [ -> ]Guests are 0.

PM me a test admin account and forum URL. I will tell you..

Guests are 1 on mine. Confused
Pages: 1 2