We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1343 ☆ A M B ☆
    • 2,213 Posts
    Hello,

    Can WLPE function in an admin activation function like different forums? (Admin must approve account before it can be used).

    Thanks
    AMDbuilder
      Patrick | Server Wrangler
      About Me: Website | Tweets |  MODX Hosting
      • 28033
      • 925 Posts
      Quote from: AMDbuilder at Apr 07, 2008, 09:00 PM

      Hello,

      Can WLPE function in an admin activation function like different forums? (Admin must approve account before it can be used).

      Thanks
      AMDbuilder

      IIRC, it’s only auto activation, or the user gets an activation code, and does it that way.

      Would be better to set up a EForm/etc. if you wanted to manually do it, IMHO.
        My Snippets
        -> PopUpChunk v1.0
        • 34017
        • 898 Posts
        What I’ve done is create 2 user groups - ’Pending Users’ and ’Registered Users’. WebloginPE registers them into ’Pending Users’, then the admin can change them to ’Registered Users’ via the manager.
          Chuck the Trukk
          ProWebscape.com :: Nashville-WebDesign.com
          - - - - - - - -
          What are TV's? Here's some info below.
          http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
          http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          I was hoping to have less work involved, but that could work well as a short term solution until something better can be developed.

          The only question I have now is just needing it to send the admin an email when someone registers. something generic like username has requested an account. If they are permitted to have an account please change their webgroup....

          I also have another site that needs the same thing only it needs to send an application instead of just a basic page.

          Could the emails be accomplished and if so how?
          AMDbuilder
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 28033
            • 925 Posts
            Quote from: AMDbuilder at Apr 08, 2008, 07:03 PM

            I was hoping to have less work involved, but that could work well as a short term solution until something better can be developed.

            The only question I have now is just needing it to send the admin an email when someone registers. something generic like username has requested an account. If they are permitted to have an account please change their webgroup....

            I also have another site that needs the same thing only it needs to send an application instead of just a basic page.

            Could the emails be accomplished and if so how?
            AMDbuilder

            IIRC, you can select an e-mail address (maybe multiple?) to send an e-mail to after a user registers. I think you can also specify what text goes into that e-mail.

            The calls should be in the Documentation, I believe.
              My Snippets
              -> PopUpChunk v1.0
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Yep! [!WebLoginPE? &type=`register` &notify=`[email protected], [email protected]`!]

              Looks like the system already does 90% of what I want it’s just missing the finishing touches.

              Thanks
              AMDbuilder
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 34017
                • 898 Posts
                You could create an activation snippet. I did something like this a while back. The process could be:

                1. Create a snippet on a protected page let it _GET an $activation_code and $username
                2. &notify email has a link like something like index.php?id=PAGE_ID_OF_SNIPPET&activation_code=XXX&username=new_username
                3. The snippet will _GET those variables and update the user to your desired user_group

                This would take more work on your end but make it easier for the client. The activation code could be anything from something in the database to a hardcoded string.

                PS - to include the username in the email, use [+post.username+] (and there is a fix to get this to work here http://modxcms.com/forums/index.php/topic,18351.msg114964.html#msg114964
                  Chuck the Trukk
                  ProWebscape.com :: Nashville-WebDesign.com
                  - - - - - - - -
                  What are TV's? Here's some info below.
                  http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                  http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
                  • 1343 ☆ A M B ☆
                  • 2,213 Posts
                  I don’t have the time to code something up myself, but if you could come up with a working solution I would be willing to pay for your time. PM for further details.

                  AMDbuilder

                  (I guess this should be in bounty section now..)
                    Patrick | Server Wrangler
                    About Me: Website | Tweets |  MODX Hosting
                    • 34017
                    • 898 Posts
                    The easiest way to do it.

                    Make sure in WebloginPE, to set in the snippet: &regType=`verify`
                    example: [!WebLoginPE? &type=`register` &regType=`verify`!]


                    Open webloginpe.class.php
                    Underneath line 639:
                    // EVENT: OnWebSaveUser
                    $this->OnWebSaveUser(’new’, $NewUser);

                    You’ll see this:
                    // Bring in php mailer!
                    $Register = new PHPMailer();
                    $Register->From = $myEmail;
                    $Register->FromName = $siteName;
                    $Register->Subject = $emailSubject;
                    $Register->Body = $message;
                    $Register->AddAddress($email, $fullname);

                    Change:
                    $Register->AddAddress($email, $fullname);

                    to this:
                    $Register->AddAddress(’[email protected]’, ’Name sent to’);


                    ---SECOND OPTION :: second easiest---
                    Add an option in the snippet
                    In weblogin.snippet.php add:

                    $RegistrationEmailTo = isset($RegistrationEmailTo) ? $RegistrationEmailTo : ’default’;

                    In webloginpe.class.php:
                    On line 405, change:
                    function Register($regType, $groups, $regRequired, $notify, $notifyTpl, $notifySubject)

                    to:
                    function Register($regType, $groups, $regRequired, $notify, $notifyTpl, $notifySubject, $RegistrationEmailTo)

                    On line 639, change:
                    $Register->AddAddress($email, $fullname);

                    to:
                    if ($RegistrationEmailTo != ’default’)
                    {
                    $Register->AddAddress($email, $fullname);
                    } else {
                    $Register->AddAddress($RegistrationEmailTo, ’$RegistrationEmailTo’);
                    }
                      Chuck the Trukk
                      ProWebscape.com :: Nashville-WebDesign.com
                      - - - - - - - -
                      What are TV's? Here's some info below.
                      http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                      http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008