FIX: Disallow email invites if enable_local_logins is disabled (PR #10805)

allowEmails used to always be set to true and did not use can_invite_via_email, which checks for enable_local_logins.

GitHub

Why is this step required? Are you using parse(stringify) to do some sort of deep clone?

Yes, that is the use case.