Monday, May 16, 2016

Disable lost password email in WordPress

In WordPress users can recover their passwords through the lost password feature available. But some times this options is used by users to spam your website by using the functionality which may result your domain to be blacklisted in Google or your hosting provider may suspend your domain for mass emailing.

 To Avoid this recover password functionality can be disabled. You add the following lines in your function.php file to stop any email from sending from your website.

  function wp_password_change_notification() 
   { 
      return false; 
   }

add_filter('allow_password_reset', 'wp_password_change_notification');

This will disable lost password email in WordPress

No comments:

Post a Comment

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...