0

I'm using the basic comment module to allow users to leave comments (name, phone, email, comment, and rating) on each resource for that specific comment type. One of the fields is an option to allow users to choose to share their personal information to others if they want. All comments are unpublished by default and have to be moderated to be published.

So, my question is this: how can I selectively choose to publish a users email or not depending on if they selected to share that information with others?

Either a manual or automatic way would work fine. Thanks!

1 Answer 1

1

You could use the template_preprocess_comment function. First you need to check the value of the "share my personal information" field or whatever you called it and act on that to display the user's email.

0

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.