Madhouse
Active member
I have a mysql query that displays on a page node in xf1, what do I need to change to make it work in xf2?
PHP:
<?php
class Callback_PageNode
{
public static function myfunction(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract &$response)
{
$mydb = XenForo_Application::get('db');
$myrows = $mydb->fetchAll("
SELECT
xf_user_external_auth.provider_key,
xf_user_external_auth.user_id,
xf_user.user_id,
xf_user.username,
xf_user.secondary_group_ids
FROM xf_user_external_auth
LEFT JOIN xf_user ON
(xf_user_external_auth.user_id = xf_user.user_id)
WHERE
xf_user_external_auth.provider = 'steam'
ORDER BY xf_user_external_auth.user_id ASC
");
$response->params['myrows'] = $myrows;
}
}