Email addresses are generally considered unique keys. When a user registers an account with an email address, registrations they've created previously with that same email address should be matched to the user account and updated to be owned by the user rather than anonymous.
Current workflow:
1) Bob registers for an event using bob@example.com
2) Bob registers for another event using bob@example.com
3) Bob creates an account (to comment, to purchase a product, to donate, etc) and uses bob@example.com as his email address
Results: Bob's registrations created with bob@example.com are still owned by anonymous, Bob isn't able to edit, or cancel those registrations. The administrator of the system also can't relate Bob's first two registrations with other actions Bob has done since he created an account.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 0001-Issue-1571086-by-mradcliffe.-Add-a-setter-callback-f.patch | 2.51 KB | mradcliffe |
| #3 | sample-rule.txt | 998 bytes | mradcliffe |
Comments
Comment #1
rerooting commentedNot sure how in depth your use case is, but you may want to check out redhen crm as it plays very nicely with this module, especially via the redhen_registration submodule. The kind of functionality that you are talking about is one of the core features of redhen crm - to dedupe based on an email field.
Comment #2
mradcliffeAdding a setter callback to Registration anon_email and user fields would allow Rules to reconcile these cases as well.
Comment #3
mradcliffeHere's a patch that adds
registration_set_propertiesthat is used by user, mail, and author. If you're creating a rule that creates an account, you need to save the account again to access properties (see Rules issue #1044342: Errors creating and using newly created entities in rules).Comment #4
mradcliffeOh, shoot, I didn't realize that my patch coincides with #1664218: Deprecate autoloaded entities for Entity Metadata Wrappers and #1664950: Missing entity property information on registration properties.
I'm going to mark this as a duplicate. Sorry.