Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 16, 2024Apr 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?
April 16, 2024Apr 16 Author Thanks a lot! And how can I access that variable inside a script (in JavaScript)?
April 16, 2024Apr 16 Solution <script> alert("{expression="\IPS\Member::loggedIn()->email"}"); </script>