1

I have a website were there are two type of users, Administrator and Clients.

I would like to add a rule that should apply if the user is Clients.

The rule should unpublished the new content and send an email to administrator.

I have manage to create the rule which is working fine but the condition is not working.

currently the rule is applying to all the user types.

I am confuse what to use as a data selector to apply the rule only to Clients users.

Thanks,

0

Are you using rule sets and triggered rules?

You should use a Rule set to set the conditions for the specific role and unpublish the content.

Then use the triggered rules to schedule the rule. E.g. When a user updates content run the Rule set

0

After some background research I manage to fix the problem.

  1. Go to content/admin/config/workflow/rules
  2. Click add a new rule
  3. Give Name to rule and select react even, in my case it was "After saving new content". You can also select restrict by type if you want to apply the rule only to one content type then click save
  4. Click add condition, select the condition to add in my case it was user has role(s), add a data selector in my case "site:current-user" because i want to run the rule if user has Role is client. select Role
  5. Click add action, select action to add in my case "Unpublish content"click save click save

It is all done, however I had two other actions Send mail to notify administrator to publish content and show a message on the site to tell user his content is waiting for admin approval

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.