![]() |
Same here. :) Would be willing to donate.
|
I need this mod for vB4 too... I would pay for it
|
It shouldn't be too hard to get this running, it's just a simple sql query more or less.
Couldn't one of the coders here give a hint? |
Hi!
I figured out how to modify the code. The code works fine when it is inserted after line 1507. This is just behind the hook "($hook = vBulletinHook::fetch_hook('register_activate_proce ss')) ? eval($hook) : false;" The code is: // Get the value for field 5 $user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = $userinfo[userid]"); if ($user['field5'] == 'Test') { $membergroupids = $userdata->fetch_field('membergroupids'); if ($membergroupids) { $membergroupids = 9; } else { $membergroupids = 9; } $userdata->set('membergroupids', $membergroupids); } My prob is, that it does not work when I use it as a plugin. Could anybody help? I guess .... but it did'nt work <?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1" product="vbulletin"> <title>Put User in Secondary Group Based on Custom Profile Field Value</title> <hookname>register_activate_process</hookname> <phpcode><![CDATA[// Get the value for field 5 $user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = " . $vbulletin->userinfo['userid'] . ""); if ($user['field5'] == 'Mathebuch') { $membergroupids = $userdata->fetch_field('membergroupids'); if ($membergroupids) { $membergroupids = 9; } else { $membergroupids = 9; } $userdata->set('membergroupids', $membergroupids); $userdata->save(); }]]></phpcode> </plugin> </plugins> |
All times are GMT. The time now is 09:02 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|