I needed to use the email address of the current user to fill out a form field. (long story as to why)
Explanation
There exist some Wiki Argument Variables that allow one to use some variables that are part of the tiki current instance. For example {{user}} will display the userid of the current user: . My first idea was to implement the same thing for to display the email id of the current user.
It is generally considered a bad idea to insert email addresses into wiki or web pages as spammers can scrape and use them. I believe this is why the idea is frowned upon. So thanks to Jonny's suggestion I came up with the following solution instead.
Method
Add the following custom.php to your tiki language directory, mine is in lang/en/ or lang/en-uk/
Copy to clipboard
get_user_email($user);
//create smarty variable assign it the value of the current user's email address
$smarty->assign('curremail', $email); }
This is how I used it via smarty plugin and div plugin and jquery plugin to pre-fill an html form field which is within html plugin. It is shown here in three parts that must be within the same page. Extraneous information has been removed &/or replaced with blah or ....
html
{HTML()}
{HTML()}
{CODE}
retrieve field value, assign it an id for use in jquery