That query won't work with external user integration, including WordPress integration, because there is no users table. But I don't understand why it's being run, since in the Q2A core it is only called from a page which also isn't available with external user integration. Do you have any non-standard plugins installed?