I’ve been doing some alterations to the UserComments snippet. Everything in there is pretty straight-forward so far, except this one line:
if($uid && ($uid*-1)==$modx->documentObject['createdby']) {
The variable $uid refers back to this statement in the snippet:
$uid = $modx->getLoginUserID();
Am I reading the code correctly, that $uid is being multiplied by negative one, and the product of that operation is being compared to the main document’s author’s user ID? If I’m reading that right, then my question is why does the user’s login ID have to be multiplied by negative one before comparing it to the document author?