Added ability to allow empty passwords, if the user does so, a random password will...
[mailer.git] / inc / template-functions.php
index beb7f685025dbae43840e6c928d00d62ccf8ef09..b675c6b6dc522617cd22de76010508efe72eed31 100644 (file)
@@ -415,7 +415,7 @@ function detectExtraTemplatePath ($template) {
 }
 
 // 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!
@@ -452,7 +452,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
 
                // 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 />");