0

I'm on Drupal 7 with Flag 2.0 (beta9). The flag module provides a checkbox option for user flags, Users may flag themselves. However, I would like to allow users to only flag themselves. In other words, I want to give each user an on/off switch as a flag, but each user should only be able to toggle the switch for herself.

What I am trying to do: I have some options users select at registration (are you interested in A? B? C? etc.) These are checkboxes. I want to give users an easy way to change these options after registering. If I send them to the edit account screen, they get the option to change their password, e-mail address, etc., which is too much. I was thinking of using flags to do this (with a rule that triggers to Set a data value when the user is flagged/unflagged), but it is crucial that users only be able to change their own values.

  • 2
    Is there a way to use a node flag instead? Out of the box, there you can restrict it to a node type and also to content only owned by the user (or not). So if you have the equivalent of a content profile set up in d7, you would be able to set it up so a flag was restricted to that type of content and only to the node owner, which might accomplish what you are after. – Jimajamma Aug 29 '12 at 2:07
  • It's a pity that for profile2 user profiles this is not an option, as there is no "Flag access by entity ownership". – berliner Nov 2 '13 at 16:17
2

Is there a way to use a node flag instead? Out of the box, there you can restrict it to a node type and also to content only owned by the user (or not).

So if you have the equivalent of a content profile set up in d7, you would be able to set it up so a flag was restricted to that type of content and only to the node owner, which might accomplish what you are after.

  • Thanks! I have a special node that is automatically created on account registration, one per user, (via Rules) for other reasons, so I can use this. – Patrick Kenny Aug 30 '12 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.