Using First Name instead of Username in New User Email and Other Emails
I am trying to have the automated Job Roller emails address users by their first name instead of their username. I have a new field in database named firstname.
In the email portion of the code I replaced:
// variables that can be used by admin to dynamically fill in email content
$find = array('/%username%/i', '/%joblist%/i', '/%jobtitle%/i', '/%blogname%/i', '/%siteurl%/i', '/%loginurl%/i', '/%useremail%/i', '/%dashboardurl%/i');
$replace = array($user_login, $job_body, $job_title, get_option('blogname'), get_option('siteurl'), get_option('siteurl').'/
wp-login.php', $user_email, $dashurl);
with
// variables that can be used by admin to dynamically fill in email content
$find = array('/%firstname%/i','/%username%/i', '/%joblist%/i', '/%jobtitle%/i', '/%blogname%/i', '/%siteurl%/i', '/%loginurl%/i', '/%useremail%/i', '/%dashboardurl%/i');
$replace = array($first_name,$user_login, $job_body, $job_title, get_option('blogname'), get_option('siteurl'), get_option('siteurl').'/
wp-login.php', $user_email, $dashurl);
and I have also replaced
// variables that can be used by admin to dynamically fill in email content
$find = array('/%username%/i', '/%password%/i', '/%blogname%/i', '/%siteurl%/i', '/%loginurl%/i', '/%useremail%/i');
$replace = array($user_login, $plaintext_pass, get_option('blogname'), get_option('siteurl'), get_option('siteurl').'/
wp-login.php', $user_email);
with
// variables that can be used by admin to dynamically fill in email content
$find = array('/%firstname%/i', '/%username%/i', '/%password%/i', '/%blogname%/i', '/%siteurl%/i', '/%loginurl%/i', '/%useremail%/i');
$replace = array($first_name, $user_login, $plaintext_pass, get_option('blogname'), get_option('siteurl'), get_option('siteurl').'/
wp-login.php', $user_email);
Using the Jobroller Dashboard under the Emails tab and under the New User Email, I replaced %username% with %firstname%.
After all of this, the new user email leaves the firstname field blank. What have I done wrong?
Chris