2

I have a user flag "Status" and I have some fields for that user like name, phone etc.

How do I not let moderators trigger that flag if any of that user field is empty?

1

1 Answer 1

1

Use the Rules module to implement what you're asking for, as detailed in the blueprint below ...

Step 1: Create a custom rule

Create a rule like so:

  • Event: after updating an account.
  • Conditions:
    • user does not yet have role (say) "abc".
    • check that none of those user fields are empty.
  • Action: grant access to a role (say) "abc".

For an example of a rule (in Rules export format) that is pretty close to what you need, have a look at my answer to "How to implement admin verification for selected user profile fields?".

Step 2: Tune the configuration of the flag

Adapt the configuration of your "Status" flag, so that you only authorize it to be used by ... euh ... indeed, users who have access to role "abc".

Happy flagging with Rules!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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