Results 1 to 8 of 8

Thread: Using First Name instead of Username in New User Email and Other Emails

  1. #1
    Thread Starter
    ciswindell's Avatar
    Join Date
    Apr 2012
    Location
    United States
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  2. #2
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,618
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    ciswindell's Avatar
    Join Date
    Apr 2012
    Location
    United States
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,618
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Thread Starter
    ciswindell's Avatar
    Join Date
    Apr 2012
    Location
    United States
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    spartac's Avatar
    Join Date
    May 2011
    Posts
    7,171
    Thanks
    75
    Thanked 830 Times in 808 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Do you need high-quality content for your Website? For a significantly reduced price? Try aicontently.com






    We answer the questions in threads as fast as the private messages, So do not send support questions via private message. Use the forum instead and open a new thread for every issue.
    Before you send any PM , Please read These rules .

  7. #7
    Thread Starter
    ciswindell's Avatar
    Join Date
    Apr 2012
    Location
    United States
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #8
    spartac's Avatar
    Join Date
    May 2011
    Posts
    7,171
    Thanks
    75
    Thanked 830 Times in 808 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Do you need high-quality content for your Website? For a significantly reduced price? Try aicontently.com






    We answer the questions in threads as fast as the private messages, So do not send support questions via private message. Use the forum instead and open a new thread for every issue.
    Before you send any PM , Please read These rules .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Login with Email instead username
    By drabello in forum ClassiPress General Discussion
    Replies: 24
    Last Post: December 16th, 2015, 01:31 PM
  2. What happens if user forgets username instead of password?
    By ybpress in forum Report ClassiPress Bugs
    Replies: 17
    Last Post: March 13th, 2015, 10:32 PM
  3. Custom Field as Unique (just like email/username)
    By majig2 in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 18th, 2011, 07:24 AM
  4. Contact Poster (auto-add email and username)
    By doctorcilantro in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: November 5th, 2010, 09:04 AM
  5. Register Page - Username & Email?
    By tbase in forum ClassiPress General Discussion
    Replies: 7
    Last Post: October 15th, 2010, 05:14 PM