FIX: check if BasicBadge is enabled for TL1 welcome message (PR #13983)

In 2018 check was added that TL1 welcome message is sent unless user already has BasicBadge granted.

I think we should also check if BasicBadge is even enabled. Otherwise, each time group is assigned to a user and trust level is recalculated, they will receive a welcome message.


        Badge.find(1).update!(enabled: false)
      if Badge.exists?(id: Badge::BasicUser, enabled: true) && !@user.badges.exists?(id: Badge::BasicUser)

This will execute two queries but if we really want to optimise this, we can consider doing an inner join.

@tgxworld what do you think about 2 selects combined? I updated PR