Home / functions.php / Disable the allow_password_reset feature
  • How to Disable the allow_password_reset feature


    Adding this snippet to the functions.php will disable the allow_password_reset feature from the login page. When using the lost password feature after you add this snippet wordpress will display “Password reset is not allowed for this user”.

    ( click code to copy )

    wordpress snippet : PHP

    function disable_password_reset() {
                  return false;
    add_filter ( 'allow_password_reset', 'disable_password_reset' );

    ( WordPress codex functions, hooks, in this snippet. )

  • Boris

    Doesn’t work… I added it to my theme’s functions.php file and the link is still there.

  • fayster

    Same here…doesn’t work

  • fake

  • Renan

    Worked, thanks.

  • Nice works, thanks for sharing