The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
User Registration - Salt Help
So I'm developing a Plugin where upon user registration, there will be a new salt (only 5 digits long) and hash created and inserted into a table, and in the user table, there will be the default salt and hash length (of around 30).
Basically, I need to know what to put after $salt to make it generate a 5 digit salt which would consist of all the characters in the normal 30-digit salt (such as a-z, A-Z, 0-9, !, @, etc.). Here's what I've tried: $salt = chr(rand(33, 126)); ^That one only generates 1 digit, which is not what I'm looking for. $salt = substr(uniqid(rand(), true), 0, 5); ^That one generates 5 digits but only numbers, no letters or other characters. |
#2
|
|||
|
|||
In includes/class_dm_user, the function fetch_user_salt() looks like this:
PHP Code:
and salt length is defined at the top of that file as 3. (In vb4 it's defined as 30). |
#3
|
||||
|
||||
Quote:
It works, thanks for your help as well! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|