before = User.where(
          order_param + ' < ? OR ' + order_param + ' = ? AND id < ?',
            user.try(order_param), user.try(order_param), user.id)
            .where.not(id: user).where.not(published_articles_count: 0)