Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The presave $op from hook_user_relationships gets called both when a relationship is requested and approved.
If I output the relationship object at the time of the request it contains a full user object for both the requestee and the requester, but at the time of approval it contains a much more limited object seen in the attached screenshot.
The relationship was being requested by an admin user, and the approval was from an account with the minimum permissions needed to request / approve relationships.
Comment | File | Size | Author |
---|---|---|---|
Selection_001.png | 15.54 KB | mrf |
Comments
Comment #1
mrf CreditAttribution: mrf commentedComment #2
mrf CreditAttribution: mrf commentedMoving this to 7.x. I already did a workaround for this issue from when I noticed it, and I'd suspect its fixed in 7 already, but leaving this up as a reminder to double check.