Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 10-22-2005, 09:25 PM
Genent Genent is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to assign usergroup to users from PHP?

Hi,
I would like to do the following, but it's not exactly clear how (is there a better doc on Data Managers than on vbulletin.com?)

So basically we have a membership based paysite, and we are running a forum on a separate domain for our visitors.

Everyone can register on the forum for free, but we would like to give access to a few extra forums for the paysite members.

We have a completely separate user database for the forum and for the paysite.
On the paysite members will be able to give their forum username and password in their profile, and they should get VIP access to the special forums.

I made a usergroup called "VIP Member" on the forum, and I would like to automatically assign this usergroup to every user that provided his username/password on the paysite. (and remove them from this group when their paysite membership expires)

What I could figure out is that I should use data managers, but there is very little documentation on how to use usergroups for instance.
Reply With Quote
  #2  
Old 10-23-2005, 06:13 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not use the standard vB Payed Subscriptions for this?
Reply With Quote
  #3  
Old 10-23-2005, 01:33 PM
Genent Genent is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Why not use the standard vB Payed Subscriptions for this?
Because we have a system already going on that can't be amended - are billing with other IPSPs, and our billing mechanism is way more complex.
The forum is an extra and represents 5% of the services - it's not the main feature - it should just be an amendment to our current services.
Reply With Quote
  #4  
Old 10-27-2005, 05:33 PM
Genent Genent is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one is able to tell how to do this?
Reply With Quote
  #5  
Old 10-27-2005, 06:19 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want the new group to be their primary group then just use a simple sql update query to set the value of usergroupid, for their record in the user table, to your desired value.
Reply With Quote
  #6  
Old 10-27-2005, 06:28 PM
Genent Genent is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
If you want the new group to be their primary group then just use a simple sql update query to set the value of usergroupid, for their record in the user table, to your desired value.
Thank you Paul
And If i want to add them additional groups? we have multiple sites - and by subscribing to 2 sites gives them 2 extra group memberships - I guess this can't be done with primary groups
Reply With Quote
  #7  
Old 10-27-2005, 07:09 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

add them as a comma seperated list to the membergroupids field.
Reply With Quote
  #8  
Old 11-09-2005, 06:57 PM
Genent Genent is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
add them as a comma seperated list to the membergroupids field.
Thank you it worked out this way
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 06:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04474 seconds
  • Memory Usage 2,220KB
  • Queries Executed 13 (?)
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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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