[How-To] fetch_userinfo_query
by
23 Oct 2005
Just found that trying to use this plugin to extend the query for userinfo: Code:
<plugin active="1" product="some product"> <title>Test</title> <hookname>fetch_userinfo_query</hookname> <phpcode><![CDATA[$hook_query_fields = ", table.*"; $hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "table AS table ON (user.userid = table.userid)"; ]]></phpcode> A quick fix since we don't need the data for a guest was to just simply wrap it in this: Code:
<plugin active="1" product="vBWar"> <title>Test</title> <hookname>fetch_userinfo_query</hookname> <phpcode><![CDATA[if ($vbulletin->userinfo['userid']) { $hook_query_fields = ", table.*"; $hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "table AS table ON (user.userid = table.userid)"; } ]]></phpcode> Posted as a bug at vb.com if it indeed is a bug... |