$hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "table AS table ON (user.userid = table.userid)";
]]></phpcode>
you get errors when activating the plugin, the reason is even though the syntax is correct the issue appears when the plugin is activated and gets stored in the datastore as the last quote in the second string causes the issue.
A quick fix since we don't need the data for a guest was to just simply wrap it in this: