How to shorten length of auto generated password sent during registration?

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
}

Leave a Comment