Got the following SQL error
Invalid SQL:
SELECT user_table.userid AS userid, profile_fields.field21 AS wantquotenotify FROM user AS user_table LEFT JOIN userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='Brian d'marge' GROUP BY user_table.userid;
Need to change:
PHP Code:
$quoteuserquery = $vbulletin->db->query_first("SELECT user_table.userid AS userid, profile_fields.field" . $quotegetfieldquery['profilefieldid'] . " AS wantquotenotify FROM " . TABLE_PREFIX . "user AS user_table LEFT JOIN " . TABLE_PREFIX . "userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='" . $kr_load[$kr] . "' GROUP BY user_table.userid");
to:
PHP Code:
$quoteuserquery = $vbulletin->db->query_first("SELECT user_table.userid AS userid, profile_fields.field" . $quotegetfieldquery['profilefieldid'] . " AS wantquotenotify FROM " . TABLE_PREFIX . "user AS user_table LEFT JOIN " . TABLE_PREFIX . "userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='" . $vbulletin->db->escape_string($kr_load[$kr]) . "' GROUP BY user_table.userid");
so as to escape the username as it contained a single quote in above error.