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.
Not a member yet? Click here to register.
Forgot Password?

Default user group

Asked Modified Viewed 9,081 times
C
chemy
C
chemy 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hello,

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.
Edited by chemy on 27-04-2009 23:11,
0 replies

7 posts

B
batbaru1
B
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

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 PHPFusion 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!
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

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:

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


to

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


Hope that works for you.

Regards,
NetriX
Edited by NetriX on 23-05-2011 13:15,
0 replies
B
batbaru1
B
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

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.

Thanks.
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

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
0 replies
B
batbaru1
B
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

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.
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

I've found the problem. I was thinking groups were saved as 1,2,3,4 but it turns out there actually .1.2.3.4

So do the following, worked for me.

$this->_setDBValue("user_groups", ".1");
0 replies
B
batbaru1
B
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Yes, that was it! Thank you!
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

B
B
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 14 threads in the forums
N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
C
C
chemy 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet