We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4610
    • 24 Posts
    Is there any way of generating an email to myself (or any other fixed email address) when a new webuser registers? I need to do this in addition to the email that is auto generated to the web user.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you’re using WebLoginPE, the &notify parameter specifies who you want to be notified; you can specify multiple recipients by separating multiple email addresses with commas. There is also the &notifyTpl parameter so you can use a customized chunk template for the email.

      If you really don’t want to use WebLoginPE, you could write a plugin using the OnWebSaveUser event, check the $mode value (for "new") and send an email. The OnWebSaveUser event makes these values available:
      "mode",
      "userid",
      "username",
      "userpassword",
      "useremail",
      "userfullname"
        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
        • 4610
        • 24 Posts
        Thanks.

        Sorry to be asking such basic questions but I’m finding the modx documentation to be woefully inadequate. How do I reference these values from within my plugin code?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          As variables; $mode etc.
            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
            • 4610
            • 24 Posts
            Oh right, just as normal php variables then?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Right. I haven’t used WebLogin for some time now; WebLoginPE is much better.
                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
                • 4610
                • 24 Posts
                Sort of wish I’d gone with webloginPE now but i’ve done the email thing now anyway.

                Just out of interest, where would I go to find out details such as which variables certain events make use of etc. The thing i’m finding most difficult really is the lack of documentation.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  I go directly to the code; there are several places to look. The parser events are in manager/includes/document.parser.inc.php; the others are in the various files in the action and the processors directories. I don’t know if these have ever been documented; they really do need to be if they haven’t.

                  I also tend to do a lot of print_r in my plugins to see just what is available.
                    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