In addition to #374845: Flag Users / Flag Content would it be possible to let users flag their own profile ONLY?
There is an option "Users may flag themselves" already.

I really like flag and i would like to use it for a lightweight "volunteer for role" like feature.
So my idea is to let users flag themselves (and only themselves).

cheers and thanks for a snappy but powerful module - ronald :-)

Comments

rokr’s picture

Sorry the related issue should be #285237: Ability to disallow a flag/unflag operation.

joecanti’s picture

hi,

Could you not achieve the same functionality simply by letting users flag themselves rather than their profile? What are you trying to achive by flagging profiles over users? If it is to create, for example, a grid of their profile pictures to say 'these people have put themselves forward for the role of...' you could have a 'flag yourself' flag, and then use views to get info from their profile like content pictures?

Joe

quicksketch’s picture

By "flag their own profile", you mean if you're using Content Profile module? The flag link already shows up on the user's profile if you're using the (core) Profile module.

Regarding user's flagging only themselves, this usually means you should just add a checkbox to the user's profile edit form, regardless of which module you're using to create your profiles.

rokr’s picture

Sorry i was not precise with the term 'profile'. At this point i don't use any profile nodes. Flag type is set to users. Using global flag option. I now want to prevent user2 to flag user1. I can prevent roles to flag but i can't prevent users to flag each other.

cheers, Ronald

quicksketch’s picture

Ah, Flag currently does not have a "Flag only myself" option, since profile modules are better suited to such functionality.

If you're determined to use Flag module, you could manually theme user-profile.tpl.php and use flag_create_link() to only show the link to the owner.

rokr’s picture

Yes, thats an option, but that wouldn't prevent users to "hijack" that link to flag other users. :-)
Maybe i think about flagging a content profile node.

Thanks for thinking about it.
cheers, Ronald

quicksketch’s picture

Flag already contains safe-guards to prevent hijacking of links. When a link is displayed, it is unique for that piece of content and cannot be faked just by typing in the URL manually. So unless a user has seen the link somewhere else, it's unlikely that they would be able to fake it.

That said, I agree that it's not 100% secure, since this is essentially security at the presentation layer, not at the functional layer.

mooffie’s picture

Status: Active » Closed (duplicate)

Marking this a duplicate of #879988: Flag permission for 'own entities'.