This is for T330816: [Epic] Temporary users should not be assigned to user groups. See also T330816#8958447.
We're disabling this feature, not because it can't be done, but because we don't want it for the MVP of IP masking (see parent task).
What needs doing
- Throw an error from UserGroupManager::addUserToGroup if called on a temporary user
- Don't re-use the existing error for IP users, since it states that the user needs an ID, which a temporary user does have
- Ensure that nowhere in MediaWiki core is calling UserGroupManager::addUserToGroup with a temporary user