I’ve just been trying this again.
I noticed that changes to the primary group setting didn’t seem to update the user’s flair to the group flair. Is the fix above still working?
On a bright note, I improved my little rails console code snippet above so you only need the group slug (and confirmed that it still works!).