Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Default user group


I'm having a problem with user registration at the moment. I've created 3 user groups - New, Member, Moderator. When a person registers on the site, I would like them to go to the New group by default, which has limited access to the forums until they're approved for more access.

Currently, when the person registers, they are not going into any of these 3 groups at all, they're somehow going into another group that I can't see (which must be the default group) also called "member" which gives them access to more of the forums then they should be able to see.

When i go into the admin panel under user admin / user groups, all 3 of the groups I created show, but the user isn't put into any of them and has to be manually placed in the correct one for the correct access to be granted.

Can someone please tell me where to find the default user group and how I would go about changing it?

I am using Fusion V7.00.05.

Thank you.
Does anybody have the answer to this question as it applies to V7.02.01? I had found the original answer for application to V7.01.05 on the PHP-Fusion mods site, whcih is now closed. I upgraded to V7.02.01 today and register.php has changed, and I don't know how to apply the commensurate mod so that a newly registered user is automatically added to a "new user" member group. Help please!
Hey batburu1,

I hope this helps. You'll need to edit the /includes/classes/UserFieldsInput.class.php file.

Around or on line 470 you should find the following:

private function _setEmptyFields() {
      $this->_userHideEmail = isset($_POST['user_hide_email']) && $_POST['user_hide_email'] == 1 ? 1 : 0;

      $userStatus = $this->adminActivation == 1 ? 2 : 0;

      if ($this->_method == "validate_insert") {
         $this->_setDBValue("user_hide_email", $this->_userHideEmail);
         $this->_setDBValue("user_avatar", "");
         $this->_setDBValue("user_posts", 0);
         $this->_setDBValue("user_threads", 0);
         $this->_setDBValue("user_joined", time());
         $this->_setDBValue("user_lastvisit", 0);
         $this->_setDBValue("user_ip", USER_IP);
         $this->_setDBValue("user_ip_type", USER_IP_TYPE);
         $this->_setDBValue("user_rights", "");
         $this->_setDBValue("user_groups", "");
         $this->_setDBValue("user_level", 101);
         $this->_setDBValue("user_status", $userStatus);
      } else {
         $this->_setDBValue("user_hide_email", $this->_userHideEmail);

I suppose if you change $this->_setDBValue("user_groups", ""); to equal the id of the group your referring to, it should work.

So let's change $this->_setDBValue("user_groups", ""); to the following for example:

$this->_setDBValue("user_groups", "");


$this->_setDBValue("user_groups", 1);

Hope that works for you.

Netrix thanks for the quick response.

That didn't work completely. I just modified that line to $this->_setDBValue("user_groups", 6); per my user group number is is a group called NEW USER. I ran a test user signup and when listing members that new user signup shows as being in the TEST USER group in the user list now. However, it seems to be a false indication or an incomplete mod that didn't manipulate other needed setting changes, because:

1. from the user list, when I click on that user's name to bring up the profile, at the very bottom of the profile where it lists user group memberships, it indicates N/A.

2. Going into the user admin panel and inspecting the user group membership (user admin -->user groups--> pulldown/edit NEW USER group), the newly registered user does not appear in the list.

3. On the main site page I have certain panels that are viewable by he NEW USER group only and very little else accessible to them (to direct and encourage user upgrade to a successive user group). This new user sees all default member or otherwise not restricted areas and does not see the panels that members of the NEW USER group are supposed to see.

I'd appreciate anything else you can provide to reoslve this.

Try placing it in quotes:

$this->_setDBValue("user_groups", "1");

If that doesn't work I'd have to look into it because I don't know why it would not be working as I'm just theorizing the results in my head. :P
Thanks NetriX, but it does the same thing.. still doesn't work. It looks as if there is other data or fields in other files that must require the same manipulation to defaulta new user registration to a specific useer group that's missing.
I've found the problem. I was thinking groups were saved as 1,2,3,4 but it turns out there actually .

So do the following, worked for me.

$this->_setDBValue("user_groups", ".1");

Yes, that was it! Thank you!
Thread Information
8 posts
8714 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: batbaru1, NetriX, chemy