vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   New members in a different user group than registered (https://vborg.vbsupport.ru/showthread.php?t=36547)

fonzerelli_79 03-25-2002 08:11 PM

New members in a different user group than registered
 
wluke said that there was a hack for this :-

i run a football site

currently rival fans are banned but i want to be able to create a user group called rival fans
they will be able to post in one room on the site

is there a way to do this when they register
ie. ask which team when they support when they sign up and then automatically assign them to the user group rival fans

fonzerelli_79 03-26-2002 12:20 PM

ello peeps!!

Admin 03-26-2002 12:25 PM

Coming soon...

fonzerelli_79 03-27-2002 09:00 AM

thanks firefly ;)

luke said that it had already been done

im not the best at php etc but i assumed that it wouldnt be too difficult

anyhoo, thanx for the update

Admin 03-27-2002 09:03 AM

It's ready for testing if you want, shall I PM you the file?

It includes a new option for usergroups, "Can users choose to join this usergroup when signing up?", so you can control exactly which usergroups new users can sign up for.

fonzerelli_79 03-27-2002 09:07 AM

that would be great firefly

ill test it no problem and let you know how i get on, ie. any bugs suggestions

pm me the file and ill try it when i get home tonight

nice one

amk35 05-08-2002 06:14 PM

FireFly ,

I'm looking for this same hack, could you pm it to me also? Thanks!

zonegray 09-20-2002 12:16 PM

Did this go any further? Found this discussion looking for something similar (want to put users in a special group based on a code they enter at registration). Can't seem to find anything in Firefly's released hacks or betas.

Logician 09-20-2002 08:50 PM

Quote:

Originally posted by zonegray
Did this go any further? Found this discussion looking for something similar (want to put users in a special group based on a code they enter at registration). Can't seem to find anything in Firefly's released hacks or betas.
Login Admin CP, create a new user profile field, make it invisible to other users, note its id..

Edit register.php, find:

PHP Code:

$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'"); 

Replace it AS:
PHP Code:


            $userfields
=$DB_site->query_first("SELECT * FROM userfield WHERE userid='$u'");
            if (
$userfields['fieldX']=='YYY'
            {
            
$DB_site->query("UPDATE user SET usergroupid=Z$dotitle WHERE userid='$u'");
            }
            else
            {
            
$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'");
            } 

Replace X with your profile field id.
Replace YYY with your secret code
Replace Z with the usergroup id users will be inserted..

This will work provided that:
1- You didnt enable new user moderation
2- You enabled email validation
3- I dont know about COPPA thing but I guess it wouldnt matter..

Not tested but should work..

Aurore 09-22-2002 04:12 PM

Looking forward for the hack!!


All times are GMT. The time now is 01:50 PM.

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.01083 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete