Default refid is always fallback now, or 0 if sql_patches is absend
[mailer.git] / lead-confirm.php
index fc693eea44b6b9ae96ddb0b5561657439874d5c4..9e4d790b94fdc5dd372663dd8b9a99c0d705be6c 100644 (file)
@@ -72,7 +72,7 @@ $content = array(
 // Is the cookie set?
 if (isSessionVariableSet('lead_uid')) {
        // Is the user-account unlocked and valid?
-       $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1",
                array(bigintval(getSession('lead_uid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Secure the ID number