vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Assign group by remote script (https://vborg.vbsupport.ru/showthread.php?t=166838)

petteyg359 01-03-2008 02:43 PM

Assign group by remote script
 
The host I run vB on is running PHP4. I have a script that requires PHP5 that retrieves information from from another source about a user's group (in a seperate application). I need to retrieve the output (true or false) of this PHP5 script to vB, and if it is true, add the user to a group (after checking to make sure they aren't already in it), if false, remove them (after checking to see if they've already been removed). I want the vB side to call it once every 24 hours (and whenever a new user registers) and check all users. The PHP5 script needs to be sent two profile variables. So:

1. Call myphp5site.org/myscript.php with profile variables field6 and field7 (via form method post?)
2. Check if member is in group "Verified".
3. If "Verified"=false and script=true, add member to "Verified".
4. If "Verified"=true and script=false, remove member from "Verified".

That should cover everything, right? How would I go about doing this?

One other question for a lsightly related mod/add-on/hack/whatever-it's-called. I assume a GPL license wouldn't work because you're using the product in a non-free way. If so, what's the closest license that is compatible with whatever license vB itself is?

petteyg359 01-07-2008 10:51 PM

My host has finally been upgraded to PHP5, so I can now run this check directly. I would still like to know if there is a command to switch a user's primary group to groupid 11 (and if another check returns possitive then make groupid 11 secondary and groupid 10 primary)


All times are GMT. The time now is 03:48 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.01381 seconds
  • Memory Usage 1,703KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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