}
// Loads an email template and compiles it
-function loadEmailTemplate ($template, $content = array(), $userid = '0') {
+function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadUserData = true) {
global $DATA;
// Make sure all template names are lowercase!
// Merge data if valid
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - PRE<br />");
- if (isUserDataValid()) {
+ if ((isUserDataValid()) && ($loadUserData === true)) {
$content = merge_array($content, getUserDataArray());
} // END - if
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - AFTER<br />");