More misc fixes and rewrites (sorry, lame description)
[mailer.git] / lead-confirm.php
index 38b94017abcadec30aba8477298ed19afde95a9a..9e4d790b94fdc5dd372663dd8b9a99c0d705be6c 100644 (file)
 // Load security stuff here
 require('inc/libs/security_functions.php');
 
-// Init "action" and "what"
+// Init start time
 $GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = '';
-$GLOBALS['action'] = '';
 
 // Set module
 $GLOBALS['module'] = 'lead-confirm';
@@ -74,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