June 28, 2016 in Technical Problems
Hi there IPS community! I'm looking for what the variables are and how to echo them for the currently logged in user's display name and their email address so that I can send it to Olark. If anyone has done Olark's visitor API integration before your assistance is greatly appreciated. Really, all I need to know is what the variables are and how to echo username and email.
EDIT: I've found how to do it. Make a new custom block in your AdminCP, use PHP as your language, and enter this code:
require_once( './init.php' );
$member = \IPS\Member::loggedIn();
fullName: "<?php print htmlspecialchars($member->name, ENT_QUOTES); ?>"
emailAddress: "<?php print htmlspecialchars($member->email, ENT_QUOTES); ?>"
Hopefully this will be of assistance to anyone who needs it.
This topic is now archived and is closed to further replies.
Started 2 hours ago
Started Wednesday at 11:08 PM
Started 3 hours ago