Support » Everything else WordPress » Stop User Password changed notification

  • I have imported users from a csv file into Restrict Content Pro but I believe that the Password Changed notification is a wordpress thing. Can I toggle that off for all users temporarily?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes, you can turn off the “Password Changed” notification for all users in your WordPress site temporarily. Here’s how:

    1. Log in to your WordPress dashboard as an administrator.
    2. Go to the “Users” menu and click on “All Users”.
    3. Select all users by clicking the checkbox at the top of the table.
    4. From the “Bulk Actions” dropdown, choose “Edit”.
    5. Click on the “Apply” button.
    6. In the “Bulk Edit” form that appears, scroll down to the “Notifications” section.
    7. Uncheck the box next to “Password Changed”.
    8. Click on the “Update” button to save the changes.

    This will disable the “Password Changed” notification for all selected users in your site. When you want to re-enable it, just repeat the process and check the box next to “Password Changed” in the “Bulk Edit” form.

    Thread Starter patbell101

    (@patbell101)

    This is happening on importing a batch of new users, they dont exist when added but still generate a Password Changed notification

    Okay, I see! To prevent the “Password Changed” notification from being sent when you import new users, you can add the following code snippet to your theme’s functions.php file or a custom plugin. This code will temporarily disable the “Password Changed” notification email during the import process:

    // Disable the password changed notification
    function disable_password_changed_email( $send, $user, $userdata ) {
        if ( defined( 'DOING_IMPORT' ) && DOING_IMPORT ) {
            return false;
        }
        return $send;
    }
    add_filter( 'send_password_change_email', 'disable_password_changed_email', 10, 3 );
    

    This code snippet adds a filter to the send_password_change_email hook, which checks if the DOING_IMPORT constant is defined and set to true. If it is, the filter returns false, disabling the password changed email notification.

    Before you start importing users, add this code snippet to your theme’s functions.php file. After you’ve finished importing the users, you can remove the code snippet to re-enable the “Password Changed” notification emails.

    Thread Starter patbell101

    (@patbell101)

    It kind of works. I have a test csv importing 4 users and the first user gets 4 emails. I can work with it by making sure the first one is a dummy email but its a bit weird.

    Thread Starter patbell101

    (@patbell101)

    OK more testing. Adding new users fine. If it is an existing user that is overwritten the Password Changed notification is sent out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.