CHANGING PASSWORD LENGTH - Aug 27th, 2014
|
When a new user signs up for an account, a randomly generated 17 character temporary password is sent to them. That's pretty secure, but if it's a bit unwieldy for your situation, you can easily change the password length to any amount of characters.
In llder versions of the Website Membership plugin, in the user-signup.php file, look for the code:
$_REQUEST['password'] = substr(md5(uniqid(rand(), true)), 15);
or in newer versions Look in the Website Membership plugin itself, for:
$password = substr(md5(uniqid(mt_rand(), true)), 15);
According to Chris Waddell of Interactive Tools "The 15 in the code skips the first 15 characters of the 32 characters returned by md5(), resulting in a 17 character string."
To set the length to 5 characters, try this:
$_REQUEST['password'] = substr(md5(uniqid(rand(), true)), 0, 27); // example output: c5560
or in newer versions
$password = substr(md5(uniqid(mt_rand(), true)), 0, 27); // example output: c5560
You can replace the 5 with any number you'd like up to 32.
|
The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact
Interactive Tools for information on the downloading of the software or the purchasing of licenses.