User accounts with duplicate email addresses can be created

Nextcloud version: Nextcloud Hub 3 (25.0.4)
Operating system and version: Ubuntu 22.04 LTS
Docker image: nextcloud:latest

The issue you are facing:

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. Log in as administrator.
  2. Create a new user account with a given email address.
  3. Create a second user account with the same email address.

Current result:
Both user accounts have been created with the same email address.

Expected result:
Creation of second user account should either be prevented or - at least - a confirmation dialog should be shown.