I am trying to set the password to the new account members last name. Security is not an issue. I submitted a ticket and was given the second line to add...but still isnt working. Amember is set to generate the password within the CP. Any ideas? This code is from the common.inc.php file function generate_password($vars=''){ if ($vars['name_l'] != '') return $vars['name_l']; // a bit of configuration global $config; $vars = (array)$vars; $min_length=$config['pass_min_length'] < 4 ? 4 : $config['pass_min_length']; $max_length=$config['pass_max_length'] > 10 ? 10 : $config['pass_max_length']; $all_g = "aeiyo"; $all_gn = $all_g . "1234567890"; $all_s = "bcdfghjkmnpqrstwxz"; /// let's go $pass = ""; srand((double)microtime()*1000000); $length = rand($min_length, $max_length); for($i=0;$i<$length;$i++) { srand((double)microtime()*1000000); if ($i % 2) if ($i < $min_length) $pass .= $all_g[ rand(0, strlen($all_g) - 1) ]; else $pass .= $all_gn[ rand(0, strlen($all_gn) - 1) ]; else $pass .= $all_s[ rand(0, strlen($all_s) - 1) ]; } return $pass; }
Hi Justin, Your code doesn't look right - drop me an email codeispoetry [at] amemberincremental.com if you still need help. Lee
Hey mjmtaiwan, I just saw your reply to this thread when Skippy brought it to my attention. I didn't receive Justin's email on the subject - he's probably found the answer himself, it's common that coders sometimes do spot it on their own Would you like to share your issues with us? Lee