We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28840
    • 46 Posts
    I'm having problems with form customization...The situation is as this:

    I have 3 userGroups (for example UsersA, UsersB, UsersC) and a From customization named "Homepage" and in it I have a set for Resource/Update (The only change is that TVs are moved to first tab and the TV tab is hidden for homepage-template). I set the UserGroup for the UsersB.

    Problem:
    If user (for example User1) is a member of UsersA & UsersB & usersC (Each has it's own resourceGroup), the from customization is not working. If I change the FormCustomization "Homepage" UserGroup to UsersC then it works.

    I'm lost. Any idea what is the problem?

    Sumoborac

    This question has been answered by sumoborac. See the first response.

    [ed. note: sumoborac last edited this post 12 years, 7 months ago.]
      • 28840
      • 46 Posts
      Ok, I seem to find the core of the problem:
      if ($this->modx->getOption('form_customization_use_all_groups',null,false)) {
                  $userGroups = $this->modx->user->getUserGroups();
              } else {
                  $primaryGroup = $this->modx->user->getPrimaryGroup();
                  if ($primaryGroup) {
                      $userGroups = array($primaryGroup->get('id'));
                  }
              }

      It looks like the "Primary" Group is the only one which gets in... I'm testing it soon.
      • discuss.answer
        • 28840
        • 46 Posts
        Yes, the 'form_customization_use_all_groups' system setting solved the problem.
        Ticket closed.


        Sumoborac