Support » Plugin: Member Approval » Approved Email has a bug in replacing names etc

  • The line in



    $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’]);

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Plugin Author Bruce Caldwell


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

    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. 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Approved Email has a bug in replacing names etc’ is closed to new replies.