@VSEphpbb also note, that the LEFT_JOIN above is not empty, so just remove it here and handle it correctly in your extension ;)