- if (fetchUserData(getRequestParameter('userid'))) {
- // Grab user's all unconfirmed mails
- // @TODO Try to rewrite this to a filter
- if (isExtensionActive('bonus')) {
- // Load bonus id
- $result = SQL_QUERY_ESC("SELECT `stats_id`, `bonus_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC",
- array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
- } else {
- // Load stats id (2nd will be ignored later! But it is needed for the same fetchrow command)
- $result = SQL_QUERY_ESC("SELECT `stats_id`, `stats_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC",
- array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
- }