سؤال

I set Content is going to be saved for Rules Event.

And then the following code in Execute custom PHP code for Rules condition. But it seems to return always TRUE no matter if the user account of node author is Active or Blocked.

return $author->status = 0;

How can I check the user status of node author in Rules condition? I would like the condition which returns TRUE when the the user status of node author is Blocked.

هل كانت مفيدة؟

المحلول

You need to use the double equation sign. What your code does right now, is that it assigns the value 0 to $author->status.

Here's updated code:

return $author->status == 0;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى drupal.stackexchange
scroll top