vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Switch Default User Groups? (https://vborg.vbsupport.ru/showthread.php?t=55804)

AndreaBash 08-01-2003 05:06 PM

Switch Default User Groups?
 
I asked this over at vbulletin.com and they sent me over here. I'm just going to copy/paste what I posted there.
----

I did a search and didn't find a definite answer, so I'm asking again. Sorry if this has been asked.

I have 2 user groups. One is 'Registered' and the other only allows access to a single forum.

When a new user is approved, they are automatically tossed into 'Registered'. Is there a way to automatically put them into the other group instead? Basically I want the other group to be default (or at least selectable).

It seems like you should be able to choose the user group for the member you are approving, but that doesn't seem to be the case.

My other admins aren't familiar with changing user groups and they really want this feature to be automatic and I really don't want to take the time to set up an exact duplicate of 'Registered' then move all of my users over to it if I don't have to.

Make sense?

assassingod 08-01-2003 05:32 PM

Alright, here is how I did it on my testboard (I had to turn off Verify Email address, but if its on I doubt there will be any problems)

Make a back-up of register.php if you use this - or test it on a testboard

Get the ID of the usergroup you want new users to be put into.

Open register.php

Find;
PHP Code:

  if ($verifyemail) {
    
$newusergroupid=3;
  } else {
    if (
$moderatenewmembers or $coppauser) {
      
$newusergroupid=4;
    } else {
      
$newusergroupid=2;
    }
  } 

Change the 2 to the new usergroup ID.

Find:
PHP Code:

            (NULL$userid".time()."'$activateid'0" . iif($newusergroupid == 4, 4, 2) . "

Change the 2 to the new usergroup ID.

Find:
PHP Code:

                $usergroup=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid=2"); 

Change the 2 to the new usergroup ID.

That should work, as I said make a backup of register.php

AndreaBash 08-02-2003 03:56 PM

Thank you so much! I will try it out today and let you know how it goes. :)

AndreaBash 08-02-2003 10:00 PM

hmm... well. I am not sure if I'm missing something, but I made these 3 changes and new users are still getting added to the Registered group.

Is there another way to do this? Can I swap the registered ID number with the new group's ID?

assassingod 08-02-2003 10:06 PM

Well I am not totally sure why it isn't working for you, it worked fine on my testboard.

Just a quick question, why dont you just edit the Registered usergroup?

AndreaBash 08-03-2003 05:05 PM

I think I'm going to have to do that. I just didn't want to spend all that time creating a new group and moving all the settings over there... then changing the Registered group to be exactly the same as the other group... not if there was an easy way to just switch them. Ya know?

I'll just do it manually... cause I am spending more time trying to switch them than it would have taken me to just manually create new groups. :)

Thanks for your help!


All times are GMT. The time now is 07:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00967 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete