Page 1 of 1

User Email variable in FrontEndUsers?

Posted: Wed Feb 10, 2010 4:47 am
by turch2009
Does anyone know what the user email variable is in FrontEndUsers?  I can't seem to find it and the "$email" or $useremail" don't seem to work.  I'm trying to create a User Defined Tag that mails to the user.

Re: User Email variable in FrontEndUsers?

Posted: Wed Feb 10, 2010 5:35 am
by turch2009
I just tried using this as an User Defined Tag and it didn't work.  I'm just trying to send an email to the user when their group has been changed so i want this UDT to work on the Frontend User Management Event "OnUpdateUser".  Here's the UTD i made.  Can someone tell me what's wrong with it?  I replaced the "$email_addr" with my personal email and it works, so I just need to have the user's email there.

mail('$email_addr','Application Approved','Your Application has been approved.');

Re: User Email variable in FrontEndUsers?

Posted: Wed Feb 10, 2010 10:59 am
by Jos
That depends if you have set "Email address is username"

You might try {get_template_vars} ?

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 2:10 am
by turch2009
Email address is not set as username.

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 2:28 am
by turch2009
I tried {get_template_vars} but it simply tells me what the vars are set as "email = none@nothing.com".  It doesn't actually give the variable.  I also made the email address the username and tried mailing to $username without success.  Could it be that the variables aren't passed along when the UDT is used?

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 3:37 am
by jmcgin51
what is the name of the email address property you created?

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 6:40 am
by turch2009
I'm trying to use the Frontend User's email property.

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 12:44 pm
by jmcgin51
yes, but what is the NAME of the property you created?  did you call it "email" or "email_address" or "emailaddress" or what?

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 3:00 pm
by turch2009
I'm not sure i understand.  I placed "mail('$email_addr','Application Approved','Your Application has been approved.');" in a UDT and attached that UDT to an event.  If I replace the "$email_addr" with a real email, it works.  I found that $email gives me the user email, so that's solved, but it still doesn't work.  i assume the Frontend User mod isn't passing the variable to the UDT.  Any thoughts on this?  I might create a new thread since it's a different question.

Re: User Email variable in FrontEndUsers?

Posted: Thu Feb 11, 2010 3:06 pm
by jmcgin51
ok, so you know that "$email" gives you the email address of the user, but you're correct that FEU doesn't make this a global variable.  You need to retrieve it first from the FEU module; I don't recall the exact syntax, but I think you can find it in the documentation or here in the forum.