Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Konstantin Obenland

    (@obenland)

    That’s an email that WordPress itself sends out, not the plugin. I’m sure it could be disabled with a filter, though.

    Best,
    Konstantin

    Hi there,

    I love WP Approve User but I’m having the same issue. I understand that it is not an email that the plugin sends out but after testing a few different configurations I determined that the “Login Details” email is only sent when the “WP Approve User” plugin is active. Do you have any suggestions on how to troubleshoot the issue?

    Joel

    Plugin Author Konstantin Obenland

    (@obenland)

    Hm, that is interesting, I’m not sure what impact the plugin should have on that.
    Are you sure it’s not related to the “Users can register” option? Or possibly a multisite installation?

    Hey Konstantin,

    Thanks for the fast response! I’m not sure how it would be related to the “users can register” option but am open to suggestion. I do have “Anyone can register” checked in general settings.

    In your comment to the prior person’s post you mention disabling it with a filter. Do you happen to have a link with info on doing that?

    Joel

    Plugin Author Konstantin Obenland

    (@obenland)

    This is where the new user notification is added:
    https://core.trac.wordpress.org/browser/tags/5.2.2/src/wp-includes/default-filters.php#L443

    You could remove that filter to disable it.

    I assume plugins like https://wordpress.org/plugins/welcome-email-editor/ could also help you with customizing it, etc.

    Thank you Konstantin! That led me to a solution that will work as of now. Here’s what I’ve done that solved the problem for me, just for the benefit of anyone reading this thread in the future.

    Problem: When I clicked “approve user” with the “WP Approve User” plugin active, WP dispatched an email to the approved user with the subject line “[SITENAME] Login Details” that instructed the user to change their password. I needed that to not happen. Note: This is not the same message as the customizable “approved!” message that WP Approve User includes. It is a separate email message that is sent by WP even when I uncheck the box for auto-sending the approved user message in WP Approve User.

    Solution: Installed “SB Welcome Email Editor” plugin. WP still sends an email automatically when I approve the user but now I can customize it to something that makes sense for my site.

    @joelrsadler @obenland

    To disable the email with login details is very easy with no need for additional plugins.
    It’s default hook and it’s pluggable, so you need to override it with a filter like so:

    add_filter( 'wp_new_user_notification_email', '__return_false');

    That’s all you need to add to your child theme functions.php, and solves the problem.
    I’m using this same function on a few projects myself, and I can confirm this works totally fine.

    @7grafix

    When adding this filter to the functions.php file does it still allow the Registration Approved email to be sent.

    Thank you very much for the filter!

    Marcus

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disable the Login Details email’ is closed to new replies.