Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-01-2003, 05:06 PM
AndreaBash's Avatar
AndreaBash AndreaBash is offline
 
Join Date: Jun 2003
Location: Chicago Area
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 08-01-2003, 05:32 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 08-02-2003, 03:56 PM
AndreaBash's Avatar
AndreaBash AndreaBash is offline
 
Join Date: Jun 2003
Location: Chicago Area
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much! I will try it out today and let you know how it goes.
Reply With Quote
  #4  
Old 08-02-2003, 10:00 PM
AndreaBash's Avatar
AndreaBash AndreaBash is offline
 
Join Date: Jun 2003
Location: Chicago Area
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 08-02-2003, 10:06 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 08-03-2003, 05:05 PM
AndreaBash's Avatar
AndreaBash AndreaBash is offline
 
Join Date: Jun 2003
Location: Chicago Area
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:21 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.04004 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete