Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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
}
share|improve this answer
    
Thank you so much, works perfectly! –  theshorttree Apr 1 '13 at 14:14
    
@theshorttree Great, you can perhaps mark this answer as accepted then. –  dalbaeb Apr 1 '13 at 14:32
    
done! thanks again! –  theshorttree Apr 3 '13 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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