Problem/Motivation
When "Connect users to RedHen contacts" is checked, it's possible to accidentally connect multiple RedHen Contacts to a single Drupal User.
Steps to reproduce
1. Create a contact connected to a user with the email test@example.com
2. Then run the following code:
$contact = \Drupal\redhen_contact\Entity\Contact::create([
'type' => 'general',
'email' => 'test@example.com',
]);
$contact->save();
3. The duplicate contact is created and attached to the user account test@example.com, resulting in two contacts connected to the same user.
Proposed resolution
Patch below.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | redhen-multiple-user-contacts-3492496-2.patch | 1.13 KB | wxactly |
Comments
Comment #2
wxactly commentedComment #3
gcbComment #5
gcb