Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
In its user parameter description the "User who flagged the @label" rules action promises:
"For non-global flags, this is the user who flagged the @label. (For global flags, this argument is ignored.)"
However, for global flags the arguments is not ignored.
See flag_rules_action_fetch_entity_by_user().
Proposed resolution
Ignore the user parameter for global flags.
Comment | File | Size | Author |
---|---|---|---|
#1 | flag-fetch_action_respect_global_flag-2238349-1.patch | 1.3 KB | czigor |
Comments
Comment #1
czigor CreditAttribution: czigor commentedComment #2
shabana.navas CreditAttribution: shabana.navas commentedYes, you are absolutely right, it was one of those functions that didn't follow the directions! Thanks for catching the error. Made one minor change to the comment:
+ // For global flags the user parameter is ignored.
Changed to:
+ // For global flags the user parameter is ignored, so we add the
// extra 'uid' condition when the flag is NOT global.
Will commit this asap. Thanks.
Comment #4
shabana.navas CreditAttribution: shabana.navas commentedCommitted! Thanks. Another similar issue popped up in-tune with this issue. So, will need to revisit this global flag on all the rules events/conditions/actions.