We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    How can I set login/register to send a notice to the administrator that there is a new user requiring attention using Revolution 2.0??

    -thanks
    -sean
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 3749
      • 24,544 Posts
      Have you downloaded and installed the Login package? It contains a Registration snippet.

      It normally sends the email to the user, who self-activates through another page.
        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
        • 26503
        • 620 Posts
        yes - that’s been installed, but it has no option [that I can see] to notify admin....

        basically the admin has to set the users group membership to one of 3 different groups, so they need to know when someone new has registered. [the automatic group assignment that register does will not work in this case]

        -thanks
        -sean
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 3749
          • 24,544 Posts
          The only think I can think of offhand would be to do away with the Confirm Registraion page and create your own system that showed you all non-active users and let you set the groups for them (and changed their status to active).

          This would get you an array containing the inactive users:

          $users = $modx->getCollection(’modUser’,array(’active’=>’0’));

          There’s probably a better way.
            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
            • 26503
            • 620 Posts
            the only thing I came up with was to write a mail function snippet and insert/include it in the registration snippet after the user successfully registers,..... but I was hoping for something more elegant/less work wink

            -thanks
              *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

              Sean Kimball CLP, CLS.
              Technical Director / Sr. Developer | BigBlock Studios
              ._______________________________________________.
              Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
              27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
              phone/fax: 905-426-5525
              • 3749
              • 24,544 Posts
              Does the current version of the confirm registration snippet have a &hooks parameter? If not, it would be a good feature request.
                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
                • 4041
                • 788 Posts
                Maybe using a plugin that fires on the OnUserActivate event (which is triggered at the end of the confirm register snippet)
                (untested)
                <?php
                // ActivateNotify Plugin
                // 8/15/2010  7:12 pm est
                if ($modx->event->name == 'OnUserActivate') {
                
                // array of emails to send the notification
                $mailto =array('[email protected]','anotheremail@anycom');
                $mailfrom = $modx->getOption('emailsender');
                // email subject
                $subject = 'New User Activation at '.$modx->getOption('site_name');
                // email body
                $body = 'A user was activated on the site.';
                
                   if (!empty($mailto)) {
                        foreach($mailto as $key => $value){
                            $modx->getService('mail', 'mail.modPHPMailer');
                            $modx->mail->set(modMail::MAIL_BODY, $body);
                            $modx->mail->set(modMail::MAIL_FROM, $mailfrom);
                            $modx->mail->set(modMail::MAIL_FROM_NAME, 'MODx');
                            $modx->mail->set(modMail::MAIL_SENDER, 'MODx');
                            $modx->mail->set(modMail::MAIL_SUBJECT, $subject);
                            $modx->mail->address('to',$value);
                            $modx->mail->setHTML(true);
                            $modx->mail->send();
                        }
                    }
                }
                ?>
                  xforum
                  http://frsbuilders.net (under construction) forum for evolution
                  • 3749
                  • 24,544 Posts
                  Nice. cool
                    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
                    • 26503
                    • 620 Posts
                    Thanks Breezer - that’s actually a much nicer idea than I had ... BTW - your code is tested now and works wink thanks.

                    -sean
                      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                      Sean Kimball CLP, CLS.
                      Technical Director / Sr. Developer | BigBlock Studios
                      ._______________________________________________.
                      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                      phone/fax: 905-426-5525
                      • 4041
                      • 788 Posts
                      No problem, glad it worked and thanks for testing smiley
                        xforum
                        http://frsbuilders.net (under construction) forum for evolution