The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
External user reg when reg is turned off
Hi all. I'm working on my first real modification to vB, and came across a question I can't figure out.
My site is using the vB user list / logged in list to control access to all parts of our site, including those outside vB (thanks to the hints in other threads here at vBulletin.org for how to do that part!). We want to combine our user registration system with vB's system. Members will pay money by check (or at least checks are one major option), so we can't use the vB subscription functionality, so we won't bother expanding the vB registration fields. The entire process will have people fill out a registration form (which includes many fields that are not part of the vB registration system), then when we receive payment, we'll activate their account. Activation will entail putting their extended info into our own user database, and then putting the relevant subset of data into the vB user database. I could (probably) write the SQL statement to insert the data into the vB user tables directly. But it would be nicer and easier if I could just submit the data to the register.php directly via my own PHP code (I'd have PHP submit the data as _POST elements). The problem, though, is that I want to require people to use our registration form instead of vB's form, since ours has many more fields. To enforce this, I've turned off "allow registration" in the adminCP. And of course register.php checks to see if "allow registration" is on or off, which means that anything I submit to register.php shouldn't work (at least, that's what I expect, looking at the code). So, is there some way programmatically (i.e., without my having to personally go into the adminCP) to allow registration on a case-by-case basis for submissions via my own PHP pages submitting to register.php, either by adding something to the _POST elements, or by sending some "allow registration" page, then the _POST data page, then a "close registration" page? Thanks in advance. |
#2
|
|||
|
|||
I never got any replies, so I tried working around the limitations. Here's what I did to allow an external registration form to register users in vBulletin, in case anyone can use it.
I turned 'allow registration' back on, and then edited the navbar template so that it doesn't show the "register" link. Given that our forum URL isn't advertised outside the site, and you need to register in order to "see" them, I'm not too worried about people trying to register directly via the forums. Then it was a relatively simple matter of making a form containing the user data (which will eventually be pulled from our custom registration page) which submits to the vB register.php page. It's important to include the "agree" variable, otherwise it will assume that you haven't yet agreed to the terms of the site. HTML Code:
<form action="forums/register.php" method="post"> <input type="hidden" name="do" value="addmember"> <input type="hidden" name="agree" value="1"> HTML Code:
<input type="text" name="email" value="email@wherever.com" readonly> <BR> <input type="text" name="emailconfirm" value="email@wherever.com" readonly> <BR> <input type="text" name="password" value="abcd1234" readonly> <BR> <input type="text" name="passwordconfirm" value="abcd1234" readonly> <BR> HTML Code:
<input type="hidden" name="options[adminemail]" value="1"> <input type="hidden" name="dst" value="2"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|