Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
David N. Posted April 16 Posted April 16 I am adding a javascript to my global header that will run only if the user is logged in. I've placed the javascript inside this if statement. {{if \IPS\Member::loggedIn()->member_id}} {{endif}} In the script, I need to to replace a variable with the currently logged-in user's email address, either plaintext or encrypted sha256, however I'm not sure how to get that email address?
David N. Posted April 16 Author Posted April 16 Thanks a lot! And how can I access that variable inside a script (in JavaScript)?
Solution Nathan Explosion Posted April 16 Solution Posted April 16 <script> alert("{expression="\IPS\Member::loggedIn()->email"}"); </script> David N. and SeNioR- 2
Recommended Posts