Delete all nodes of a user using flags and rules I want to delete all nodes for a user whoes any one node has been flagged as spam.

For example:

If user has created 3 nodes of same/different content types, then If admin flag any one content as spam, then all the 3 nodes should get deleted and the user should get blocked.

I am able to block the user and delete the flagged node but not the other 2 nodes. I want to delete all nodes associated to that user.



Please help.
I did in this way without writing a single line of code.

1) Add action: Fetch entity by property: Choose Entity type as 'Node', Property as 'Author' and Data selector as 'flagged-node:author'. Choose variable label ('spam nodes' in my case) and variable name ('spam_nodes' in my case) as you wish.

2) Add Loop: Select Data selector as 'spam-nodes' (this will show as per your  variable label in step 1). Set variable label('spam node' in my case) and variable name('spam_item' in my case) as you wish.

3) Now click on 'Add action' link under 'Operations' column against the loop you have added in step 2. Select 'Delete Entity' and set the Data selector as 'spam-item' (this will show as per your variable label in step 2).