Override the default password length when creating or updating a user profile

Question

I may be missing something. My understanding is wp_generate_password is pluggable. When I run the function below, it doesn’t change the password length in the display when adding a new user or modifying a current user.

function wp_password() {

    // Modify the args supplied to wp_generate_password
    $args = array(
        'length'              => '100',
        'special_chars'       => true,
        'extra_special_chars' => false,
    );
    
    wp_generate_password ($args);
}
apply_filters( 'wp_generate_password', 'wp_password' );
0
Motivated 6 days 2022-09-18T14:11:24-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse