if ( !is_null( $user ) ) {
// Note the joins in $q are the same as those from ->getJoin() above
// so we only need to add 'conds' here.
if ( !is_null( $user ) ) {
// Note the joins in $q are the same as those from ->getJoin() above
// so we only need to add 'conds' here.