![]() |
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. |
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:
|
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. |
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. |
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).
|
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? |
Have you had a look at register.php?
|
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. |
I meant actually looking in the register.php source (ie. the raw PHP code, not looking through a browser) ;).
|
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. |
I believe anything over field4 is not a vBulletin default, as shown below. So this must mean that field5 and field6 are custom fields which means that are not likely to be in the default register.php?
Biography field1 Location field2 Interests field3 Occupation field4 |
Quote:
PHP Code:
|
Hi Sir,
Thank you for your reply. Sorry to say that I have not found out the location of this mentioned variable in the entire vbulletin package. It seems to be that this variable exists in the earlier version of vBUlletin. My current installed version of vBulletin is "vBulletin® v3.7.2 Patch Level 1". |
Certain POST variables are passed through the input cleaner, which populates the $vbulletin->GPC array.
|
guys i'm running vBulletin 3.5.8 and do not have this code in my class_dm_user.php file. what's up? since i cannot find it, i cannot proceed........ any help??
|
Which code are you referring to?
|
I'm referring to :
File: ./includes/class_dm_user.php Line: 634 Find: PHP Code: if (is_banned_email($email) AND !$this->adminoverride) and replace with: PHP Code: if (!is_banned_email($email) AND !$this->adminoverride) I am running 3.5.8 and therefore do not see this in the file specified above. Do i have any other options???? this is EXACTLY what i have been looking for for quite some time!!! |
For 3.5.7
File: ./includes/class_dm_user.php Line: ~515 find: PHP Code:
PHP Code:
|
Can you provide instructions how to navigate to the whitelist (previously the blacklist) so that i may begin allowing the designated users to register?
Thank you for helping me locate the code!! |
Go to the default email censor (vBulletin Options > User Banning Options).
|
thank you i figured it out on my own yesterday and already have it working....
I want to thank all of you for your help and support...... :D |
All times are GMT. The time now is 11:15 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:
|