WordPress.org

Support

Support » Plugins and Hacks » bbPress Notify (No Spam) » [Resolved] dynamic user roles

[Resolved] dynamic user roles

  • Hello useStrict, thanks for picking up this great little plugin.
    I suppose the original author has dropped support?

    I needed the plugin to send email to forum participants and other user roles, which did not appear in the list, so I wrote a quick fix. I think this could be useful to lots of folks, so I share the code, hoping this will make it in the next version of the plugin:

    In functions _topic_recipients_inputfield() and _reply_recipients_inputfield(), replace

    $options = array('blogadmin'...

    by

    global $wp_roles;
    $options = $wp_roles->get_names();

    and

    In functions notify_new_topic() and notify_new_reply(), replace the long switch statement by

    $users = get_users(array('role' => $opt_recipient));
    foreach ((array)$users as $user)
    {
    $user = get_object_vars($user);
    $recipients[] = $user['ID'];
    }

    You might also consider removing settings conversions relating to version 0.1.

    http://wordpress.org/extend/plugins/bbpress-notify-nospam/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vinny

    @usestrict

    Hi Paul,

    I tried to contact the original author with a change request pretty much like you did here but I never got a reply. So I adopted the plugin.

    I had a look at your pastebin code @ http://pastebin.com/d3Xt4A4a and I like the changes. My only concern is that you removed the old plugin deactivator. Was it causing errors? I put it there to avoid conflicts in case someone is using the spam-permitting version of the plugin.

    Cheers,
    Vinny

    Hi Vinny, yea, I saw that you tried to contact the original author. it’s a pity that the plugin repository doesn’t provide more tools for collaboration. I wish there was something like an official fork of a plugin, that would avoid redundant work and result in fewer but better plugins with good support.

    Feel free to place the old plugin deactivator back, it did not cause errors.

    Cheers,
    Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] dynamic user roles’ is closed to new replies.
Skip to toolbar