We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36793
    • 5 Posts
    I'm a bit stuck in how to solve this.
    I want a Member zone (non mgr) with multiple pages where some page's are only visible for some user groups.
    There are 3 levels of Users (Basic, Standard, Pro) where the Pro user can visit all protected pages, the Standard most of the protected pages and the Basic only a few of them.

    I already have the experience to create protected pages, usergroups etc (used it in other sites) but I never had to deal with multiple login levels and multiple Unautorized pages.

    I created the different User Groups and put the resources in the apropriate Resource groups and that works. Is that the best used method or do I have to use Authority levels or something else?

    Can I forward a logged in Basic user to a different Unauthorized page then a Standard user or Pro user?

    I also want to show all resources in the menu via Wayfinder, but a Basic user will only see the resources which are in his Resource group. Can I override this? I don't see any setting for this...

    Many thanks,
    Björn
      • 3749
      • 24,544 Posts
      It sounds like you're doing it right. I don't recommend using Authority levels/roles for this -- it will just confuse things.

      You can send users to a different unauthorized page in various ways. You can create an 'unauthorized_page' User Setting and set it to the ID of the page you want to send them to, though you'll have to create that setting for every user.

      You could also use a snippet with $modx->user->isMember() and $modx->sendRedirect() to send them anywhere based on their group memberships.

      I think you should be able to show pages without the user being able to edit them by using a policy with load and list, but not view or edit permission.
        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
        • 36793
        • 5 Posts
        Hi Bob,
        Thanks for your fast response!
        Good to here that I already did it the right way.

        Setting the unauthorized_page for every user is no option as there will be some hundreds of users...
        I'll try to do it with a snippet call. Good idea!

        Maybe adding some system settings on user groups could be a nice feature for new modx builds? smiley The same way that we currently do for contexts but then for user groups?