Freebies

BuddyBoss Retype
Password Remover

Hey there! I’m Paul, and today I want to talk about an important issue that can greatly affect user experience, especially for older users.

Recently, I came across a concern raised by another BuddyBoss site owner regarding the password reset process.

To address this, I’ve converted some code I had into a little plugin that simplifies the process and eliminates the need to retype the generated password.

Join me on the computer, and together we’ll improve the password reset experience on your BuddyBoss site.

Let’s get started!

Option 1 – Plugin

In this video, we’re going to set up the easiest option, which is the plugin version, to improve the password reset process on your site. You can find the plugin download link below. Once you have the plugin downloaded, we’ll go through the steps of adding it to WordPress.

Here are the steps to set up the plugin:

  • Click on “Add” in the WordPress admin area.
  • Select “Upload Plugin” and choose the downloaded plugin file.
  • Click “Install Now” and then “Activate.”
  • Test it out by opening your site in an incognito window and clicking on “Login.”
  • Select “Forgot password” and enter your email address.
  • Copy and paste or click on the reset link from the email
  • Notice that the “Confirm Password” step has been removed.
  • Verify that the plugin is working by testing different scenarios, such as clicking “Save” with the pre-generated secure password, entering your own password, or trying an insecure password.
Download Plugin

Option 2 – Code Snippet

Instructions:In this instructional video I will guide you through an alternative approach. If you are familiar with coding or have a web developer on your team, this method can be a great alternative.We’ll focus on locating the “functions.php” file, which is the key file for this task. In my case, I’m running the Buddy Boss theme with its child theme.Simply copy and paste the code snippet below in functions.php.

WARNING: If you’re not comfortable with coding, I highly recommend using the plugin, which essentially achieves the same outcome in a user-friendly way. Testing the code is crucial, and if done correctly, it should remove the unwanted password prompt.

Code Snippet:

add_action( 'login_enqueue_scripts', 'enqueue_custom_login_script' );

function enqueue_custom_login_script() {
   $action = isset($_GET['action']) ? $_GET['action'] : '';

   if ($action === 'rp' || $action === 'resetpass') {
       wp_register_script( 'custom-login-script', false );
       wp_enqueue_script( 'custom-login-script' );

       $inline_script = "
           jQuery(document).ready(function($) {
               $('.user-bs-pass2-wrap').hide();
               
               function updatePass2() {
                   $('#pass2, #bs-pass2').val($('#pass1').val());
               }                $('#pass1').on('input propertychange', updatePass2);

               $('.wp-generate-pw').on('click', function() {
                   setTimeout(updatePass2, 200);
               });

               $('#resetpassform').on('submit', updatePass2);
           });
       ";

       wp_add_inline_script( 'custom-login-script', $inline_script);
   }
}