• Hi,

    while I generally like this plugin very much, there are a few things I would love to see:

    1. Could I use first name /last name as variables instead of only user_login in confirmation emails? Of course once those two are mandatory fields in the registration process. So, have something in mails like:
    Howdy %firstname%, or Welcome %firstname% %lastname%, instead of the only option `Hi, %user_login%

    2. How can I insert additional variables into different email types? For example: writing a regular “new user” email allows you to send the password (%user_pass%), but you cannot send password in a user activation message! So, I would like to have one of the two options:

    • After activation (sent by activation email) send another confirmation mail with the login credentials (say: for future reference, these are your login credentials:…), OR
    • Possibility to include login information (%user_login% AND %user_pass%) in the activation email (say: click link to activate your account. Once activated, you can login using your credentials:…)

    Is there an easy way to include one of those two possibilities, say by adding a hook? If not, would that be included into a (near) future update?

    Thanks for any help
    M

    http://wordpress.org/extend/plugins/theme-my-login/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    1. Yes, you can. You can use any variable available to the WP_User object.
    2. See above.
    Thread Starter milanouser

    (@milanouser)

    Jeff, thanks for the good news – and for answering so quickly. Great job!

    Unfortunately I am quite at a loss how to implement that.

    Where and how can I define additional custom replacement variables? Especially to make it “update-proof”?
    Searching your plugin I think I understand that some of the variables are defined in modules\custom-user-links\custom-user-links.php (user_id, username), others in modules\custom-email\custom-email.php.

    Do I have to add my custom variables here, and if so, can I move these files to my theme to keep them save from plugin updates? If yes, where to (special plugin folder?)

    Thanks for any hint
    Cheers,
    M

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Are you trying to add values that are not stored in the usermeta table?

    Thread Starter milanouser

    (@milanouser)

    Jeff,

    no, all I would like to use is first_name on basically all messages, and password in clear on activation confirmation mail.

    I tried to use%user_pass% variable on user activation message, but that leaves it blank, as it is not defined for this kind of message (only for the regular registration email, it seems).

    For first_name, I know that in PHP I can get use $current_user->user_firstname, but how do I use that in the admin part (i.e. in e-mail messages)?

    Thanks for your continued help!
    M

    Plugin Author Jeff Farthing

    (@jfarthing84)

    First name can be access as %first_name%, as that’s how it’s stored in the usermeta table.

    After a user activates their account, they should then receive the New User e-mail, so you would include the password there.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Use first name / last name in email confirmation instead of user_login’ is closed to new replies.