H
H
hypero2020-08-21 13:17:28
WordPress
hypero, 2020-08-21 13:17:28

How to disable password generation when registering Wordpress?

Hello.

How to disable password generation when registering Wordpress?
When registering, the following letter comes to the mail:
5f3f9efea5121947259007.png
The site has a login and password, so password generation is not needed

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VPVPVP, 2020-08-26
@VPVPVP

Try this, in function.php add

add_filter( 'random_password', 'disable_random_password', 10, 2 );

function disable_random_password( $password ) {
    $action = isset( $_GET['action'] ) ? $_GET['action'] : '';
    if ( 'wp-login.php' === $GLOBALS['pagenow'] && ( 'rp' == $action  || 'resetpass' == $action ) ) {
        return '';
    }
    return $password;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question