User Email variable in FrontEndUsers?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

User Email variable in FrontEndUsers?

Post 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.
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: User Email variable in FrontEndUsers?

Post 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.');
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: User Email variable in FrontEndUsers?

Post by Jos »

That depends if you have set "Email address is username"

You might try {get_template_vars} ?
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: User Email variable in FrontEndUsers?

Post by turch2009 »

Email address is not set as username.
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: User Email variable in FrontEndUsers?

Post 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?
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: User Email variable in FrontEndUsers?

Post by jmcgin51 »

what is the name of the email address property you created?
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: User Email variable in FrontEndUsers?

Post by turch2009 »

I'm trying to use the Frontend User's email property.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: User Email variable in FrontEndUsers?

Post 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?
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: User Email variable in FrontEndUsers?

Post 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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: User Email variable in FrontEndUsers?

Post 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.
Post Reply

Return to “Modules/Add-Ons”