More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / template-functions.php
index aea217a7fa08e9253dee6faa4c6086b48658f6af..59354c3b2ada5a1ddad7e4c818380884a07a80e4 100644 (file)
@@ -458,7 +458,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
 
        // Load user's data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UID={$userid},template={$template},content[]=".gettype($content));
-       if (($userid > 0) && (is_array($content))) {
+       if ((isValidUserId($userid)) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");