]> git.mxchange.org Git - mailer.git/blobdiff - inc/email-functions.php
More fixes for wrong table name :(
[mailer.git] / inc / email-functions.php
index d854a993ad655baa404b108be27f2450aff5da7c..1bd2e4e7d74a3cce2e565a3874d4648738c174a9 100644 (file)
@@ -59,7 +59,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
                        // Set webmaster
                        $toEmail = getWebmaster();
                }
-       } elseif ($toEmail == '0') {
+       } elseif (($toEmail == '0') || (is_null($toEmail))) {
                // Is the webmaster!
                $toEmail = getWebmaster();
        }
@@ -245,7 +245,10 @@ function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart =
        } // END - if
 
        // Is the raw userid set?
-       if (postRequestElement($userIdColumn[0], $id) > 0) {
+       if (isValidUserId(postRequestElement($userIdColumn[0], $id))) {
+               // Set it in content
+               $content[$userIdColumn[0]] = bigintval(postRequestElement($userIdColumn[0], $id));
+
                // Load email template
                if (!empty($subjectPart)) {
                        $mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $tableName[0], $content);