If there are no comments on the current topic then user can delete the post.

If there are one or more comments on the forum-topic then user will not be able to edit or delete forum-topic.

Which module should i use or which hook needs to be implemented?

1 Answer 1


You're looking for hook_node_access() where $op == 'delete'.


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.