We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    Maybe this question is more of a general MODx question, I don’t know.

    In a user’s profile page, what would be the proper way to show which web user groups a user is apart of and offer check boxes to allow them to request permission to other groups. I have a few web user groups that I want to make it easy for a registered user to know if they are a member and if not ask special permission to join. However, I would not want to show every group in the backend.

    Second, there are a few other web user groups that I would like to allow instant join/unjoin whenever the user saves their profile. Newsletter groups for example.

    • I would suggest rethinking this a tad.

      To you the developer you would "understand" that they would be joining a "group".

      To the site visitor it may be a s simple as a check mark in a box asking, "Would you like to receive our newsletter?"


      Saving this should be as simple as saving the webgroup number and their internal id number to the modx_web_groups table.

      If they uncheck just remove the row based on their internalid and the webgroup number.

      This does what you want, it is just a different way of "thinking" about it.


      Even simpler: add a newsletter field to the extended table. A check makes it a yes and they get it that way.

      This will probably be much easier for you to do this way. This combines both worlds. It allows them to edit their profile, and gets them your newsletter (if they want)

        Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

        Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
        • 13736
        • 345 Posts
        So saving the webgroup number and their internal ID number to the modx_web_groups table?

        I guess that’s not built into the WebLoginPE snippet? Is that a task for the eForm snippet or what would be the proper method to make that happen? One of the questions I guess I have it how do I make those check boxes already be checked if the user is already a part of the group.

        To give a more specific example.

        I have a few groups called
        Choir
        Band
        Orchestra
        Handbells

        I want to have check boxes on a users profile page that they can check, and have a request sent to the administrator to add them to those groups. They will then have access to protected areas of the site. If they are already a member of a group, the check box will show that and allow them to uncheck, sending an opposite message to be removed from the group. The request needs to get administrator intervention to make sure that person is actually involved.

        The second part would be the newsletter groups that would NOT require administrator approval. Checking/unchecking those would update their group status instantly.