public function canAttach(PermissionUser $user) { if ($this->getConfig('postAttachmentsMax', 1) > 0) { return $user->canAttachNew($this) || $user->canAttachOld($this); } return false; }