Closed (duplicate)
Project:
Flag
Version:
5.x-dev
Component:
Flag core
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
15 Jan 2026 at 06:34 UTC
Updated:
10 Feb 2026 at 08:36 UTC
Jump to comment: Most recent
In current code, there is no method to unflag specific flag ID of a user
Add a method to \Drupal\flag\FlagService - perhaps call it unflagAllByFlagIdOfUser
1. add the method
2. use it in \Drupal\flag\FlagService::unflagAllByFlagIdOfUser
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
suryabhi commentedComment #3
suryabhi commentedComment #5
suryabhi commentedComment #6
suryabhi commentedComment #7
suryabhi commentedComment #8
deaom commentedIsn't this already addressed in #3034896: FlagService - unflagAllByUserByFlag? What's the difference?
Comment #9
suryabhi commentedIn #3034896, You have created a separate method to address it but in my PR change i am using existing method to address it. The point, if we handle it through the existing method why we need to create new one
Comment #10
ivnishAdding a new parameter in the middle to the existing methods like "unflagAllByUser" breaks a lot of sites. I can't approve this. Also already commited the same method https://git.drupalcode.org/project/flag/-/commit/88e93bb5bf1b342e917b815...