It's been my experience that many (most?) people who request a temporary password are often the customers the need a little bit of hand-holding... and who are the ones who are most likely to appreciate anything we can do to make their online shopping experience as SIMPLE as possible.
The following edit makes the temporary passwords a bit friendlier, easier to remember, and easier to type. (Believe it or not, some of my older customers still have difficulty with "cut-and-paste".)
TESTED IN: ISC version 4.07 (Perhaps this function still exists in newer versions)
REGULAR WARNINGS: At your own risk... test before going live... keep backups... yadda-yadda-yadda!
FILE TO EDIT: /lib/general.php
SEARCH FOR:
Code: Select all
function GenerateReadablePassword($charLength=GENERATED_PASSWORD_LENGTH)
Code: Select all
function OLD_GenerateReadablePassword($charLength=GENERATED_PASSWORD_LENGTH)
Code: Select all
function GenerateReadablePassword() {
$adjectives = "red,white,blue,green,orange,yellow,pink,purple,violet,happy,silly";
$nouns = "pony,kitten,puppy,house,mouse,horse,cat,dog,duck,fish,pizza,monkey,zebra,";
$nouns .= "elephant,chicken,sheep,rhino,tree,flower,flamingo,robin,sparrow,lion,tiger,";
$nouns .= "bear,fox,deer,cow,piglet,turkey,donkey,goat,eagle,swan,owl,penguin,whale,dolphin";
$nouns = explode(',', $nouns);
$adjectives = explode(',', $adjectives);
mt_srand((double)microtime()*1000000);
$a = mt_rand(0, count($adjectives)-1);
$n = mt_rand(0, count($nouns)-1);
$pwd = $adjectives[$a] . $nouns[$n];
return $pwd;
}
I realize that the passwords generated here are easier to guess (if someone is so inclined)... but I'm satisfied that the initial email confirmation (BEFORE a password is provided) is sufficient for my purposes.