We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 577
    • 132 Posts

    MemberCheck calls which then blows up and everything fails in 2.1.2. (Although I would assume this to be the case for all 2.1.*
    $this->modx->isMemberOfWebGroup()
    


    Solution: Replace with these 3 lines ... replace the existing $check.... line as well
    $usr        = $this->modx->getUser();
    $usrGroups  = $usr->getUserGroupNames();
    $check      = count(array_intersect($usrGroups,$groups));
    


    If there is an official place to update this or post the bug let me know.

      "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
      • 3749
      • 24,544 Posts
      I’m not sure what the variables contain, but this might work as well:

      $check = $this->modx->user->isMember($groups);
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 577
        • 132 Posts
        Thanks I will check (no pun intended) that out. I figured there was a more elegant way then what I came up with
          "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
          • 813 ā˜† A M B ā˜†
          • 326 Posts
          Thanks for the solution. I noticed it the other day but assumed I was doing something wrong, so I just switched to Personalize.