XF 2.1 Disable reply in conversation for group !$xf.visitor.isMemberOf

Azaly

Active member
Hi. I try to disable reply in conversation for bad users whithout large addon's. All these users are assigned to group with id=7. So in conversation_view template I've replaced <xf:if is="$conversation.canReply()"> with <xf:if is="!$xf.visitor.isMemberOf(7) OR $conversation.canReply()">, but it don't work :cry: . Where I'm wrong 🙄 ?
 
You're using or in your condition, which means they can reply if they're not a member of that group or if they have permission. You'd probably meant to use and instead, but this doesn't prevent more clever users from replying, it just hides the interface for it. Why not simply remove their conversation permissions?
 
I disabled Start conversations for this group, but it doesn't mean they couldn't reply in already started conversation. In xf1.5 I've used special addon Conversation Reply Permission.
 
I know it, and like @Xon addons very much! But it seems to me that it isn't good idea to install large addon only for one thing it can do. To be sure I try do not install anything which change default db 😰.
 
Top Bottom