1

is there a way to shorten the length of the 'auto generated password' which is sent during registration of a new user?

I would like to shorten this password to 5 characters max and also remove the numbers '0' and '1' as they can be confused for letters 'O' and 'L'.

My users are not very tech savvy and most don't know how to copy and paste a password. They type each character instead which can be time consuming and frustrating at the same time which is why I am looking to shorten the password.

My wordpress version is: 3.5.1

1 Answer 1

2

Use the random_password hook. It will trigger on new registrations once a random password has been generated.

add_filter('random_password', 'modify_the_pass');

function modify_the_pass($pass) {
    $pass = substr($pass, 0, 6); // make $pass six characters
    return $pass; // return our new $pass
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.