Remove ability for users to change passwords

Greets:

I’m just throwing this out as an incomplete thought since 1) it;s interesting for those who work on closed wpmu sites like for a company or blog network and 2) showing James that it’s doable without telling the person who asked that it is. :slight_smile:

Re: http://edublogs.org/forums/topic.php?id=7834

http://wordpress.org/support/topic/206214

I was thinking using the show_password_fields filter route myself:

http://wordpress.org/support/topic/222147

  • dsader
    • WPMU DEV Initiate

    I tried this as mu-plugin, seems to work. Am I missing anything?

    <?php
    add_filter('show_password_fields',create_function('$nopass_profile','return false;'));
    add_filter('allow_password_reset',create_function('$nopass_login','return false;'));
    ?>

  • drmike
    • DEV MAN’s Mascot

    You still want the admins to be able to change and set passwords. If those two lines will allow them to do so, then you;re fine.

    I haven’t tried this so it’s posted here as an "incomplete thought."

    I get a lot of these on my walks.

  • Andrew
    • Champion of Loops

    Hiya,

    You may need to wrap those two lines with a site admin check like so:

    <?php

    if (!is_site_admin()) {

    add_filter('show_password_fields',create_function('$nopass_profile','return false;'));

    add_filter('allow_password_reset',create_function('$nopass_login','return false;'));

    }

    ?>

    Thanks,

    Andrew