Record user role changes across a WordPress network for troubleshooting

One of my WP/BP projects experiences a perpetual problem, where every few weeks a handful of users is demoted on one of their blogs – they go mysteriously from Editor to Subscriber, or something like that. This sort of thing is a beast to troubleshoot, because it’s not readily reproducible.

So I wrote a small utility plugin that will help site administrators keep tabs on every role-change through the entire installation. Put the plugin into mu-plugins and the run the installation script, and it’ll fire up every time a user’s `wp_x_capabilities` meta key changes, and record some helpful information about it in a custom database table (user id, logged in user id, blog id, BP group id, stuff like that).

For more on the plugin, and to download it, visit its page on Github.

Record user role changes across a WordPress network for troubleshooting by Boone Gorges, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

3 thoughts on “Record user role changes across a WordPress network for troubleshooting

  1. Paul Gibbs

    You’re probably ahead of the game already if you’re using the version in your github, but we’re using the old 1.5 version from wporg and I modified it a bit like your github build: http://pastebin.com/bgHFVM84

    Our testing scenario was with a new regular user account who has a blog, write a blog post. Then join any group(s). Check in wp-admin again, and if you can still see and edit your previous blog post.

    Reply

Leave a Reply