Ingenious
Well-known member
On my vB forum I allow access to a specialist forum if the member "signs" a disclaimer. This disclaimer is just a form on an external page. However it was easy to add some lines of code to the start of that external page, so that it would check if the user was logged into vB, and if so, pre-fill their username into the disclaimer for emailing to me (or tell them to log in first, or detect if they were already in the upgraded usergroup and send them packing).
You get the idea
Is there a XenForo equivalent of this please?
I need to check:
Are they logged in?
If logged in, are they already in the target usergroup?
If logged in and not already in the target usergroup, get their username to pre-fill a form for them to submit.
A copy and paste example would be great
Thanks.
Code:
require_once('global.php');
(this loaded up the vB session etc)
and later on:
<? if ($vbulletin->userinfo['userid']!=0) {
(user is logged in)
if (is_member_of($vbulletin->userinfo, 10)){
(tell user they are already in that usergroup0
}
}else{
tell user to log in}
You get the idea
Is there a XenForo equivalent of this please?
I need to check:
Are they logged in?
If logged in, are they already in the target usergroup?
If logged in and not already in the target usergroup, get their username to pre-fill a form for them to submit.
A copy and paste example would be great
Thanks.