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.
-
☆ A M B ☆
- 24,524 Posts
If you’re using WebLoginPE, the ¬ify parameter specifies who you want to be notified; you can specify multiple recipients by separating multiple email addresses with commas. There is also the ¬ifyTpl 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"
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?
-
☆ A M B ☆
- 24,524 Posts
Oh right, just as normal php variables then?
-
☆ A M B ☆
- 24,524 Posts
Right. I haven’t used WebLogin for some time now; WebLoginPE is much better.
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.
-
☆ 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.