Users cannot be created if no unsupervised deduping rule exists
We have recently had an issue where users could not be added via the WordPress admin add new user screen. The following exception was logged:
Unsupervised rule for Individual does not exist
Steps to reproduce:
- Go to the CiviCRM dedup rules config screen (/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fdeduperules&reset=1)
- For any unsupervised rules under the "Individual Rules" table, either delete the rule, or change the usage type to "General".
- Try adding a new WordPress user at /wp-admin/user-new.php
I've not tested this, but I expect the easiest course of action is to wrap the call to
CiviCRM_For_WordPress_Users in a try-catch block. I've not checked to see if this issue affects Drupal/ Joomla.
There is currently nothing in the documentation to suggest having an unsupervised rule is a requirement, but if not having an unsupervised rule will cause other problems then this should be clearly stated in https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/