We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    EDIT: How weird...the issue is gone now.
      My Snippets
      -> PopUpChunk v1.0
      • 26975
      • 26 Posts
      I’ve been playing more with PPP, and have found one easier fix to PPP not working with users who are not logged in. In propagate (around line 470, not sure if my numbers are correct), I added to the initial check:
      /* Safety check to ensure user is the logged in user if not an allowed editor */
      			if (($ppp_userId != $modx->getLoginUserID()) && ($ppp_editOtherUser != 1)) {
      				echo "<p>Something went wrong. Sorry.</p>";
      				return false;
      			} 

      ^ Original. All well and good if they are already logged in, but if not:
      elseif ("" == $modx->getLoginUserID()){
      				return true;
      			}	


      I thought there may have been a better spot to check earlier in the code, but perhaps not. I’m not sure how often PPP gets called on pages people aren’t logged in on, but for me, there are a few forms which will be used by both those logged in and out, and it’ll be nice for them to not have to enter info.