Okay
  Public Ticket #3442945
Adding user information in registration emails
Closed

Comments

  •  1
    Jon marchand started the conversation

    I am attempting to add user login email, username, etc to the wholesale registration approved email. In the current template (which I have moved to my theme folder) the only global variable I can seem to call is the $first_name. I want to be able to add a section that says.....

    For you records, your login username is ______ ....

    How can I code this into the php?

  •  1
    Jon marchand replied

    this is the email template I am referring to ...

    Attached files:  Screenshot 2023-08-23 at 12.50.55 PM.png

  •  2,218
    WebWizards replied

    Hi Jon,

    Yes, you can get the username / email, starting with the $user variable that is there there. 

    You can add this code after line 11 where the $user variable is defined:

    $username = $user->user_login;
    $email_address = $user->user_email;
    

    You can then use $username and $email_address to display that data.


    Let me know if I can help with anything, or if you have any questions,

    Kind regards,

    Stefan


  •  1
    Jon marchand replied

    This worked!!! Thank you very much!