The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to restrict only 1 domain email during reg. & how to set new value to be unique?
I had recently bought a vBulletin license.
In the customization progress, I meet 2 problems as follows : 1. Staff ID to be unique * I had already define a new value, Staff ID and I would like to make this field as unique where no duplication is allowed. Beside Staff ID to be unique, I had also set Username and Email to be unique. But, we are having problem to set Staff ID as unique field. How should I overcome this matter? 2. Staff Email to be only using xxx@makanfree.com * I would like to restrict the registration email to accept @makanfree.com email ONLY. As to my knowledge, I can only restrict not to accept which email, is it possible for the code to be customized to accept only 1 domain which is @makanfree.com It would be good if anyone is able to assist me with some guideline or manual which I am able to refer to. Thank you. |
#2
|
|||
|
|||
1. Will need a bit more information. How did you add this staff-id?
2. Use the default email domain censor, and change the following line (vB 3.7.2) File: ./includes/class_dm_user.php Line: 634 Find: PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Thank you for your help and I solved the 2. problem.
As for the problem no 1, I want to get the global variable name in which the user defined variables value are contain... I have found that in vBulletin v3.0 but that line of code is not available in the vBulletin version installed in the server. It will be some type of "$userfield['field4] format. |
#4
|
|||
|
|||
Hi,
Anyone can help out on how to set the newly defined value in the registration page to be unique (means no duplication in the db) such as email address and username? Is it possible to be done? Please provide me some guideline to solve my problems. Thank you. |
#5
|
||||
|
||||
If the value is user entered, just query for it in the database - if it results in 0 rows, it is "unique". If it is meant to be an automatically generated field, just use AUTO_INCREMENT on the field (I am assuming you want an integer).
|
#6
|
|||
|
|||
I need the variable in which the user defined field values are stored during registration process. it would be like this format -$userfield['field6'].......$userfield[6],..... so on... I am unable to find it...
Can anyone assist on where to find the variable? |
#7
|
||||
|
||||
Have you had a look at register.php?
|
#8
|
|||
|
|||
Thank you for your reply.
Yes, I had a look at that page already. And I found the line of the input box for Staff Id as follows. <input type="text" class="bginput" name="userfield[field6]" id="ctb_field6" value="" size="25" maxlength="100" /> But I need the php variable name which holds the staff id which is the value stored in userfield[field6]. This variable should be able to be found at /includes/class_dm_user.php, but I am unable to find it. Just as $email holds the email address the user entered, there must be something which holds this staff id value. I suppose if I am able to get the php variable that holds the staff id, I should be able to compare and make sure that there is no duplication of the staff id in the db. |
#9
|
||||
|
||||
I meant actually looking in the register.php source (ie. the raw PHP code, not looking through a browser) .
|
#10
|
|||
|
|||
Thanks for the reply!
I did look into the register.php. The problem is I am not able to find the php variable name which holds the staff id which is newly defined value. Staff ID is actually a new value that had been added on the registration page. For example, $email = $vbulletin->GPC['email']; -- $email is storing the email that had been entered by the user during registration. but, the I could not manage to find which php variable stores the newly defined value. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|