It does not do that right now.
update the username and/or email on Drupal.
Save
It does not update in Recurly.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3112853_entity_update_recurly_account.patch | 549 bytes | brunodbo |
Issue fork recurly-3112853
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
eojthebraveI think this is probably the domain of the Recurly module, and not this module. This module doesn't currently do anything other than add/remove roles from a user account. It looks like the Recurly module's
\Drupal\recurly\RecurlyEntityOperations::entityUpdate()is triggered (or should be) when a user account is updated. And there's code there that looks like it should be setting the 'username' in Recurly. But I haven't actually tested to confirm that it's working.I'm going to move this issue to the Recurly module's queue though and we can work on it there.
Can you confirm that the code in
\Drupal\recurly\RecurlyEntityOperations::entityUpdateis called when a user entity is saved? I would start there for trying to debug this one.Comment #3
brunodbo\Drupal\recurly\RecurlyEntityOperations::entityUpdatedoes get called. It looks like the issue is with the way the original entity is loaded in that method. It uses$entity->getOriginalId(), which will return NULL for most entity types, since "By default, entities do not support renames and do not have original IDs." (quoting the comment in\Drupal\Core\Entity\EntityBase::getOriginalId).The attached patch gets the original entity using
$entity->original, which gets the original entity, so the original values can be compared to the new ones. I'm not sure if core has an entity method to get the original entity, but it doesn't look like there is.Comment #4
brunodboComment #5
eojthebraveComment #7
eojthebraveI created an MR against the 4.x branch that fixes the issue with updates not being pushed to Recurly. Thanks @brunodbo for the tip on how to fix it. I also updated the service definition for the RecurlyEntityOperations service since it was missing the messenger service. And, I wrote tests for the RecurlyEntityOperations::entityUpdate() code.
Comment #8
blakehall commentedRTBC, this looks good to me. Nice to have this functionality working again.
Comment #10
eojthebraveThanks everyone.
Comment #11
eojthebrave