The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hello everyone,
I've been trying to construct a plugin where, upon a user purchasing any sort of subscription on the Forums, it'd update their usergroup on my server. Here's the Plugin information: Location: paidsub_build Code: Code:
$uid_ps = $vbulletin->userinfo['userid'];
$userid_ps = fetch_userinfo($uid_ps);
$query = "UPDATE characters SET mgroup = 11 WHERE id = '{$userid_ps}'";
print_log("Applying Premium for: User ID - {$vbulletin->userinfo['userid']}, Changing group to - 11");
$db->query_write($query);
Thanks a bunch
|
|
#2
|
|||
|
|||
|
It looks like you already have the user info but are calling fetch_userinfo()? I don't think you have to do that. Also the return value is an array. I think you would just want to use $uid_ps in your query like:
Code:
$uid_ps = $vbulletin->userinfo['userid']; $query = "UPDATE characters SET mgroup = 11 WHERE id = $uid_ps"; |
|
#3
|
||||
|
||||
|
Quote:
Here's the new code: Code:
$uid_ps = $vbulletin->userinfo['userid'];
//$userid_ps = fetch_userinfo($uid_ps);
$query = "UPDATE characters SET mgroup = 11 WHERE id = $uid_ps";
print_log("Applying Premium for: User ID - {$vbulletin->userinfo['userid']}, Changing group to - 11");
$db->query_write($query);
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|