i enabled the access control to allow anonymous to flag content. For some reason it will not place the link on the pages. do i need to change code?

CommentFileSizeAuthor
#2 anonymous_flag.diff2.74 KBgreggles

Comments

Oreps’s picture

how would this be done?

greggles’s picture

Status: Active » Needs review
StatusFileSize
new2.74 KB

I've attached a patch which does this because I need it for a site.

There were two problems that I found:

1) there was a check for if ($user->uid) { around the generation of the links which evaulates to "false" for uid 0 (anonymous user) which I removed because the user_access checks for the permissions for uid 0 just fine
2) in the sending of the email an anonymous user doesn't have a name or a mail, so I defaulted the name/emails to the settings values for anonymous user and the default site mail respectively

There may be more implications that need to be reviewed but these seemed like the major hurdles to me in the use of this module by an anonymous user.

kbahey’s picture

Status: Needs review » Patch (to be ported)

I added code to 4.7 to allow anonymous to flag content.

Need to be ported to 5.x.

kbahey’s picture

Version: 4.7.x-1.x-dev » 5.x-2.0
Status: Patch (to be ported) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)