Closed (fixed)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2011 at 11:10 UTC
Updated:
13 Jan 2014 at 09:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chaps2 commentedThis patch does the trick but may not be ideal. Rather than replicate all the anonymous user handling code I replaced the query with a call to flag_get_user_flags() with an array sort to order by most recent flags first.
Comment #2
chaps2 commentedComment #3
Jhef.Vicedo commentedSession API module is needed to support and handle flagging for anonymous users. So we should use the session Session API provides. Attached is a patch.
Comment #4
mattcasey commentedWithout this update, anonymous flagging and 'trimming' a flag to one per user does not work. It took me half a day to figure this out and come to the same solution as #3. Of course I found this post at the same time :)
Please commit! Thanks
Comment #5
quicksketchThis patch doesn't look right either. It won't work for flags that are "global", because the UID (and SID) are both 0 for global flags. The function needs to take into account whether the flag is global or not and adjust as needed.
Comment #6
Jhef.Vicedo commentedI believe the flag method handles that. It checks for global setting and then set $uid and $sid to 0 if true.
Comment #7
Anonymous (not verified) commentedPatch works for me too - lifesaver, please commit!
Comment #8
joachim commentedComment #9
dsdeiz commentedI think this is already in place? I see this in
flag_trim_flag():Comment #10
shabana.navas commented