In that pull request I missed this instance (or perhaps it was added afterward).
In this specific case, joining against the users table doesn't provide much benefit, given that no u. fields are selected by the query. The only marginal benefit is that joining ensures that records aren't returned in cases where a user has since been deleted from the wp_users table, but I'm guessing this is very much an edge case, since WP marks users as deleted rather than removing their rows from wp_users. As such, I think we can simply remove the JOIN clause.
As in #133, the presence of the JOIN is breaking the functionality altogether in cases where the user table is not kept in the same database as the site's H5P tables.
Previously: #133
In that pull request I missed this instance (or perhaps it was added afterward).
In this specific case, joining against the users table doesn't provide much benefit, given that no
u.
fields are selected by the query. The only marginal benefit is that joining ensures that records aren't returned in cases where a user has since been deleted from thewp_users
table, but I'm guessing this is very much an edge case, since WP marks users as deleted rather than removing their rows fromwp_users
. As such, I think we can simply remove theJOIN
clause.As in #133, the presence of the JOIN is breaking the functionality altogether in cases where the user table is not kept in the same database as the site's H5P tables.