vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to assign usergroup to users from PHP? (https://vborg.vbsupport.ru/showthread.php?t=99050)

Genent 10-22-2005 09:25 PM

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.

Marco van Herwaarden 10-23-2005 06:13 AM

Why not use the standard vB Payed Subscriptions for this?

Genent 10-23-2005 01:33 PM

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.

Genent 10-27-2005 05:33 PM

No one is able to tell how to do this?

Paul M 10-27-2005 06:19 PM

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.

Genent 10-27-2005 06:28 PM

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

Paul M 10-27-2005 07:09 PM

add them as a comma seperated list to the membergroupids field.

Genent 11-09-2005 06:57 PM

Quote:

Originally Posted by Paul M
add them as a comma seperated list to the membergroupids field.

Thank you it worked out this way :)


All times are GMT. The time now is 06:59 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.01057 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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