WordPress.org

Ready to get started?Download WordPress

Forums

Member Approval
[resolved] Approved Email has a bug in replacing names etc (4 posts)

  1. Rob Marlbrough
    Member
    Posted 5 months ago #

    The line in

    member-approval/includes/notifications.php

    is:

    $opts['new-user-email']['body'] = str_replace(array('%%firstname%%', '%%lastname%%', '%%fullname%%'), array($user->first_name, $user->last_name, $user->first_name.' '.$user->last_name), $opts['new-user-email']['body']);

    should be:

    $opts['approval-email']['body'] = str_replace(array('%%firstname%%', '%%lastname%%', '%%fullname%%'), array($user->first_name, $user->last_name, $user->first_name.' '.$user->last_name), $opts['new-user-email']['body']);

    http://wordpress.org/plugins/member-approval/

  2. Rob Marlbrough
    Member
    Posted 5 months ago #

    Oh actually, that's wrong too, it should be the line in the public static function approved($user_id) function, changed to this:

    $opts['approval-email']['body'] = str_replace(array('%%firstname%%', '%%lastname%%', '%%fullname%%'), array($user->first_name, $user->last_name, $user->first_name.' '.$user->last_name), $opts['approval-email']['body']);

    It was clearly a copy/paste from the new_user function.

  3. Bruce Caldwell
    Member
    Plugin Author

    Posted 5 months ago #

    Thanks very much! I've put this into my development environment. I'll release this later tonight.

  4. Rob Marlbrough
    Member
    Posted 5 months ago #

    My pleasure. Loving the plugin, I use it for accepting new contributors, and the approval email now includes next steps for updating their profile and bio, and editorial guidelines for new posts.

    I've tried a few other plugins that approve new users, and they either don't work or don't have approval emails.

    I've sent in a donation for your efforts, and encourage others to do the same. ;-)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.