vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Registration process: Allow user to select user group? (https://vborg.vbsupport.ru/showthread.php?t=233501)

razec 01-19-2010 04:20 AM

Registration process: Allow user to select user group?
 
I'm looking to modify the registration process slightly but I'm not sure where to begin with it. When users sign up for the board I'm designing, they need to be able to select the type of user they are. Based on this selection, they're assigned to one of several corresponding user groups or redirected to the subscriptions page (one of the options is a recurring paid monthly subscription). I'm thinking this would need to be a second step to the registration process (presented to them after they verify their account).

How could I add this so it happens automatically, like after they click the confirmation URL for their account?

James Birkett 01-19-2010 03:13 PM

The only step I can give you on this is in register.php lines 346 -> 357.

That piece of code:
PHP Code:

if ($vbulletin->options['verifyemail'])
    {
        
$newusergroupid 3;
    }
    else if (
$vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
    {
        
$newusergroupid 4;
    }
    else
    {
        
$newusergroupid 2;
    } 

assigns the user to the default usergroup.

My guess would be that you would want to manipulate that code (or use one of the plugin hooks) to change $newusergroupid to the usergroup ID selected by the user.

ajhalls 04-06-2010 01:44 PM

This would be a nice feature to have working

TigerC10 04-06-2010 05:37 PM

There was a mod for this in 3.7
https://vborg.vbsupport.ru/showthread.php?t=186076

You could ask the developer to upgrade the mod for 4.0 compatibility.

Vaupell 04-06-2010 08:39 PM

You could use my mod.. and preset usergroups in admincp
then change the title with instructions in html format..
like

Enter wanted usergroup :
  • 1 = wanker A group
  • 2 = wanker B group
  • 3 = wanker C group

and then the invitation codes just match accordingly,,
like 1 = wankerg group A, 2 group b etc etc.. ..

And it runs on vb 4... :p
https://vborg.vbsupport.ru/showthread.php?t=238681

AFemaleProdigy 03-28-2011 01:22 AM

Hey razec,

What did you end up doing? I want to do the same thing, but am not sure what would be the best method.

Thanks!


All times are GMT. The time now is 09:26 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.01055 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)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