Prevent different users from having the same mobile number even if one of them is blocked/not active user.

How to reproduce:

  • Create user either by bulk import or simply by using Drupal Rest API service.
  • Set initial user status to "0" - blocked.
  • Activate users by drupal user bulk operations.

Result:
Multiple active users will have the same phone number.

Comments

mqanneh created an issue. See original summary.

mqanneh’s picture

Assigned: mqanneh » Unassigned
mqanneh’s picture

@jeetendrakumar I was thinking about implementing hook_ENTITY_TYPE_insert() instead of form validation, this way we will always make sure that the module logic will be applied.

Please let me know what do you think.