WordPress Plugin: Bulk Password Reset

This post is about the ‘Bulk Password Reset’ plugin for WordPress. With this plugin you can easily reset the password of users within your WordPress website.

screenshot-1Some time ago I was searching for a WordPress plugin that can help me reset the passwords of certain users within the WordPress database. After having a tweet discussion about this with Remkus de Vries he confirmed to me that there was no such kind of plugin.  As I really would like that have this feature/option in a plugin in stead of doing it directly in the database, I thougth ‘why not do it myself’. First of all I wrote some features I would like to have:

  • Bulk reset the password of users;
    Sent a bulk message to certain users or groups and reset their password. Within the mail a request should be made to change their password.
  • Able to set your own password;
    Add an extra field where you can set your own password in stead of the WordPress generated password.
  • Add a message to the outgoing e-mail.
    Additional message can be added to the body message of the outgoing e-mail.

With this in mind I took a look in the sourcecode of WordPress and then I came up with some additional features/requirements, like:

  • Bulk authentication e-mail;
    As the normal procedure of WordPress is to first sent an authentication message, this feature has been added to the plugin.
  • Able to set the authentication code;
    As a custom password is possible, a custom authentication code should also remain to the possibilites.
  • Reset the password-nag.
    After a user logs in to WordPress a message is shown to change the password. With a simple option it is possible to deactivate this.

After having a look on how to build a plugin I started on working with the plugin template created by Pressography. For the admin section I took a look how Joost de Valk created his admin section for the great Google Analytics plugin. On the right you will find a screenshot how the admin section is looking.

When the admin section was created the core functions for sending a authentication message and a password reset message where copied and adjusted to fit the requirements above. After some test runs, fixes and adjustments I can finally release this new plugin to the public.

Download

Get the plugin from the WordPress Plugins Directory.

Installation

  1. Drop the file folder ‘bulk_password_reset’ into /wp-content/plugins/
  2. Activate the plugin in the Plugin Management
  3. Navigate to ‘Users’ –> ‘Bulk Password Reset’

Usage

  1. Select one or more usergroup(s) for which you would like to perform a password reset;
  2. Set additional ‘advanced’ options and;
  3. Activate the checkbox ‘Do the bulk reset‘ as this forces the reset, else only the settings will be saved.

Donate

The author does not ask you to donate for this plugin, because he himself is a happy user of free software.

, , ,

Over Ruben Woudsma

In het dagelijks leven ben ik werkzaam als testmanager. Daarnaast ben ik actief als raadslid namens voor het CDA in de gemeente Huizen. Ook ben ik actief in de protestantse kerk te Huizen, in het bestuur van kinderboerderij Huizen en ben ik lid van de identiteitscommissie PCBS De Parel.

18 reacties op “WordPress Plugin: Bulk Password Reset”

  1. Jens Swelson 8 december 2009 om 06:25 # Beantwoorden

    I don’t really get the use of this plugin. Can you give an example of a situation where you need to reset the passwords of a group of users?

    • Ruben Woudsma 8 december 2009 om 08:14 # Beantwoorden

      Thank you for your reply. Maybe the explanation about the usage of the plugin was not clear. I added a section about the ‘usage’. Hope this will explain it a bit.

      A situation when you can use this plugin is e.g.
      – when you do not trust your database or WordPress install anymore due to some hack/virus;
      – when you manually loaded several users without a notification and now you want to sent the password anyway.

  2. Remkus 8 december 2009 om 10:29 # Beantwoorden

    Ik ging je vanochtend een mail sturen met dat ik ‘m getest had en voor zover ik getest heb het ook goed werkt.. maar toen ik door mijn gemiste tweets van gisteravond heen akkerde zag ik dat ie al live stond. Way to go Ruben!

  3. joy 19 december 2009 om 08:22 # Beantwoorden

    Hi, I do not really understand how to use/install this plugin. May you explain with step by step instruction please?
    TIA!

  4. Ryan Miller 13 januari 2010 om 23:47 # Beantwoorden

    Hello Ruben,

    Thank you for creating this plugin. I believe it is exactly what I need on my website. I’m having a problem, though. I activated the plugin and everything was fine. I then went to the settings and found error messages in the “Recipients” box.

    I’ve created additional roles via the Role Manager plugin. I’m not sure if that plugin is not working with your plugin. Here’s the error I get:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in D:\PHOENIX.LIFETEEN.COM\wp-content\plugins\bulk-password-reset\bulk_password_reset.php on line 188 > Role - Life Teen

    Any help would be appreciated!

    • Ruben Woudsma 15 januari 2010 om 07:46 # Beantwoorden

      Hi Ryan, thank you for your response. I have tested the plugin with several other plugins, but not with all of them. If you are using the Role Manager plugin that could be a problem. You can try removing the section on line 188 in the plugin. Thus, remove echo (in_array($key, $send_roles) ? ‘ selected=”selected”‘ : ”); Hope this helps, if not please sent me a note, so I can further analyze it.

      • Jaz 31 augustus 2011 om 16:12 # Beantwoorden

        Excellent plugin, I had a failed hack attempt last night and only finding a few plugins available, yours was the only one that worked, after a couple of edits.

        I removed the following line: echo (in_array($key, $send_roles) ? ‘ selected=”selected”‘ : ”);

        This resulted in an error so I replaced line 188 with: echo (in_array($key, (array) $send_roles) ? ‘ selected=”selected”‘ : ”);?>>

        I got the code from the WordPress Forum and it’s not my work. I also had to change another line (mentioned in my comment below) to view the advanced settings. Editing was easy and it now works like a charm.

        Thank you so much for this work, it’s saved me a big hassle of manually changing passwords one by one 😉

        • Ruben Woudsma 12 september 2011 om 08:50 # Beantwoorden

          Thank you all for the replies. I am working on the solution and will upload it soon. Unfortunatly I had some problems with SVN.

  5. Geoff 14 april 2010 om 15:44 # Beantwoorden

    Hi Ruben, this plugin looks very useful, but it’s not working in 2.9.x. This was reported on the official plugin page too at http://wordpress.org/support/topic/374021 and I can confirm I am also seeing this wrong datatype error. Also, would it be hard to change the plugin so we could select (Ctrl+click) on a number of individual users and send them new passwords that way? Thanks again 🙂

    • Ruben Woudsma 20 april 2010 om 20:40 # Beantwoorden

      Hi Geoff, did you also tried removing the section on line 188 just as I mentioned to Ryan in the reply above?

  6. Geoff 14 april 2010 om 15:45 # Beantwoorden

    Just want to add that I don’t have Role Manager installed.

  7. Pourgeallerve 17 januari 2011 om 16:16 # Beantwoorden

    =

  8. pam 10 augustus 2011 om 13:52 # Beantwoorden

    great plugin. Thank you.

  9. Gregg 30 augustus 2011 om 00:58 # Beantwoorden

    Ruben I need your help. I think this plugin going to be prefect for what I need to do. I am adding a bunch of users but don’t want to send out an email for a while. But then I will need to notify them of the new password. My problem is after installing it I do not see the advances section even after checking the box. Tried it both in Firefox and in Chrome.

Trackbacks/Pingbacks

  1. Tweets die vermelden WordPress Plugin: Bulk Password Reset « Ruben Woudsma -- Topsy.com - 8 december 2009

    […] Dit blogartikel was vermeld op Twitter door Joost de Valk en Ruben Woudsma, Christiaan W. Lustig. Christiaan W. Lustig heeft gezegd: RT @rubenwoudsma: New blog post about my first WordPress plugin: Bulk Password Reset, see: http://bit.ly/7xlqOj […]

  2. Bulk Password Reset: release of stable 1.0 version - 15 september 2011

    […] plugin ‘Bulk Password Reset‘ for WordPress has been updated. Due to the new releases of WordPress some minor issues where […]

Geef een reactie