<?php
namespace MMO\UserPermission\XF\Entity;
class Thread extends XFCP_Thread
{
public function canLockUnlock(&$error = null)
{
$canLock = parent::canLockUnlock($error);
$visitor = \XF::visitor();
if ($this->user_id == $visitor->user_id)
{
$canLock = ($canLock || $visitor->hasNodePermission($this->node_id, 'lockUnlockOwnThread'));
}
return $canLock;
}
}