"Users waiting for approval" messages after migration

Ok cool, here’s what you can do to handle your specific case:

  1. Approve/reject any pending users that are currently visible in your review queue

  2. Take a backup of your site

  3. Enter the rails console of your site

    cd /var/discourse
    ./launcher enter app
    rails c
    
  4. Get the users that are in approval limbo

    pending_users = AdminUserIndexQuery.new(query: 'pending', stats: false).find_users_query
    
  5. Run the following to approve them

    pending_users.each do |u|
      u.approved = true
      u.approved_by = Discourse.system_user
      u.approved_at = Time.zone.now
      u.save!
    end
    

That should do it!