• Hello,

    I’m running a site in which most of users are not tech savvy, so there’s a lot of trouble getting a new password after adding a new user. Basicly they just press the “reset password” button without acknowledge they’ve choose a strong password without save it.

    One simple thought is to disable the auto generate strong password. Is it possible?

    The idea is to keep a blank field (instead of the generated strong password) before the user reset the password. With the empty field it’s more simple to acknowledge that’s a place to insert a new password.

    Please chek this image: https://ibb.co/k5u835

    thanks in advance,
    Ed

Viewing 3 replies - 1 through 3 (of 3 total)
  • pwpsupport

    (@premiumwpsupport)

    Hi Ed!

    You can load the password reset page with an empty field by adding the below code to the bottom of your theme’s functions.php file:

    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;
    }

    Does this help?

    Thread Starter ejrfigueiredo

    (@ejrfigueiredo)

    Hi,

    Thanks for replying. There’s an error
    Parse error: syntax error, unexpected ‘function’ (T_FUNCTION) in (URL/functions.php) on line 1598

    The code on line 1598 is: function disable_random_password( $password ) {

    Thanks for your help.
    Ed

    Thanks pwpsupport,

    Your Solution worked for me. Is there any way to hide characters?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘disable auto generate password’ is closed to new replies.