The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Userid not generated automatically
Hi guys,
I'm trying to mod VB3 in a different way, I don't want to generate automatically an userid... instead I want to give the choice to the user to select his(her) userid. Why? Is really simple, I want to replace the userid with an alphanumeric serial of numbers (employee number). So, if I work for a company, I will have my unique employee number as userid, for example A50021, my username and my password. Now, what type will become the "userid" field? Changing the actual php code should be really easy, to let the user enter his(her) id: Code:
print_input_row('<b>User ID</b>', 'userid', ''); $DB_site->query(" INSERT INTO " . TABLE_PREFIX . "user (userid, username, ... VALUES ('" . intval($_POST['userid']) . "', '" . addslashes($_POST['username']) . "', ... $userid = intval($_POST['userid']); Let me know what I should change in the table... Thanks guys. |
#2
|
|||
|
|||
Quote:
Personally I'd add another column like EmployeeID and reference it where appropriate rather than attempt to modify the userid since there are intvals done everywhere to sanatize the data. |
#3
|
||||
|
||||
Thanks Scott, is a good idea.
I will post here the results, once I test more in this direction... What type of field should I use for alphanumeric chars? The text one? |
#4
|
||||
|
||||
I would suggest VARCHAR(length.of.Employeeid) ...
|
#5
|
||||
|
||||
Thanks guys.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|