Support form fixed
[mailer.git] / inc / functions.php
index 177886ad3aaf33e96f46aaf77563b558733e8368..3f5f434e2486fc8551b0b79fdde7d04d5945e099 100644 (file)
@@ -240,11 +240,11 @@ function LOAD_TEMPLATE($template, $return=false, $content=array()) {
        $ret = "";
        if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
 
-       // @DEPRECATED Try to remove this if() block
+       // @DEPRECATED Try to rewrite the if() condition
        if ($template == "member_support_form") {
                // Support request of a member
-               $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
-                array($GLOBALS['userid']), __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+                       array($GLOBALS['userid']), __FILE__, __LINE__);
 
                // Is content an array?
                if (is_array($content)) {