$result = SQL_QUERY_ESC("SELECT userid
FROM `{!_MYSQL_PREFIX!}_user_data`
-WHERE email='%s'".$locked." LIMIT 1",
+WHERE `email`='%s'".$locked." LIMIT 1",
array($email), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load userid
list($status) = SQL_FETCHROW($result);
// Create an error code from given status
- $ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
+ $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
} else {
// ID not found!
- $ERROR = getCode('WRONG_ID');
+ $errorCode = getCode('WRONG_ID');
}
// Construct URL
- $URL = "modules.php?module=index&what=login&login=".$ERROR;
+ $URL = "modules.php?module=index&what=login&login=".$errorCode;
} else {
// ID not found!
$URL = "modules.php?module=index&what=login&login=".getCode('WRONG_ID');
if (!empty($email)) $email = str_replace("{DOT}", '.', $email);
// Init result and error
- $ERROR = "";
+ $errorCode = "";
$result = false;
// Probe userid/nickname
} else {
// Userid not set!
DEBUG_LOG(__FUNCTION__, __LINE__, "Userid is not set! BUG!");
- $ERROR = getCode('WRONG_ID');
+ $errorCode = getCode('WRONG_ID');
}
// Any entry found?
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('GUEST_NEW_PASSWORD_SEND'));
} else {
// Account is locked or unconfirmed
- $ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
+ $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
// Load URL
- LOAD_URL("modules.php?module=index&what=login&login=".$ERROR);
+ LOAD_URL("modules.php?module=index&what=login&login=".$errorCode);
}
} else {
// ID or email is wrong
}
// Return the error code
- return $ERROR;
+ return $errorCode;
}
// [EOF]