We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I have a site with 2 contexts, each with their own user access lists.

    When a user is created by the admin (who has access to both contexts in the manager) the signupemail_message sent only references the info from the web context (which some new users will not have access to).

    Is there a way in the core for an admin to send context-specific email notifications, or will I need to create a CMP/plugin to extend this?

    Currently when an admin creates a new user, they assign them to the user group during the creation process (tab two of the create user screen) .

    Jason
    • You should be able to create a setting for the second context to set its email messages; you can also create lexicon files specifically for it and use those.

      http://rtfm.modx.com/display/revolution20/Internationalization
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • Looking further into this, I will have to create a plugin as I can't see of a way to create a user and have the system know which context to send the email for

        To give an overview:
        The site has a primary domain (www.site.com) that routes to the "web" context. The second context is a subdomain (sub.site.com).

        New users ONLY have access to front-end contexts (no mgr access for anyone but admins). They can have access to www.site.com, or sub.site.com, or both (for "leader" roles) front-ends.

        Typically, the admin is going to access the manager through www.site.com/manager. So when they create a user, I don't see a way they can send the login info to the user if the user will be added to a user group that only has access to sub.site.com. If I add the signupemail setting to the sub.site.com context, I don't see that the system would know to use it when the user is created in the manager.

        I'll post my plugin code as soon as I get it working, but I believe the only way to send the user the proper link to the url they have access to would be to check for a usergroup on member create, then send the email based on that usergroup.
        • Hm. Yes, that is a problem. Seems to me this would be a good reason for having the web context available to everyone, and having separate contexts for sections you want protected in various ways. Then global things like user profiles would be in the default web context, always available to everyone.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org