We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15914
    • 145 Posts
    Firstly:

    a BIG BIG BIG thanks goes to Susan Ottwell for helping me with this in the IRC Chatroom.

    Now... to the point.

    Ever wanted to have users sign up to your website but want to authenticate their email address they typed in? Then the attached file is for you.

    Create a chunk for your registration form WITHOUT any password fields. Then use the [tt]&tpl[/tt] parameter in the [tt][[WebSignup]][/tt] snippet to reference your chunk.

    Copy websignup.inc.php in the attached .zip file and extract it to /assets/snippets/weblogin/ overwriting the original.

    That’s it. When a user registers, they are sent an email with their selected username and a randomly generated password. They can only login if the email address they provided upon registration is valid. (Don’t forget to give them access to the [tt][[WebChangePwd]][/tt] snippet somewhere so they can change that horrendous password.

    The changes to the file (that Susan so kindly pointed out to me) are that the "[tt]// verify password[/tt]" bit is moved so it is directly above the "[tt]// check password[/tt]" bit. Then both bits are wrapped in an [tt]if[/tt] statement. If the password is not set in the form, then it uses the [tt]webLoginGeneratePassword()[/tt] function instead.

    There is a [tt]FileComparisonReport.html[/tt] (as usual with me) to outline the differences between our modded file (left) and the original that shipped with MODx 0.9.1 (right).

    A feature request has been made in FlySpray
      Kunal Kapoor
      Technical Director
      Limesharp Internet Limited - Effective, Functional, Standards Compliant

      IRC Nick: KingKoopa
      Skype ID: KingKoopa16
      • 25663 MODX Staff
      • 12,272 Posts
      This is awesome and in all honesty should probably be a default install. Will it work with the original method, too?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 15914
        • 145 Posts
        Quote from: rthrash at Feb 24, 2006, 12:07 PM

        This is awesome and in all honesty should probably be a default install. Will it work with the original method, too?

        I have tested it, and it most certainly does...
          Kunal Kapoor
          Technical Director
          Limesharp Internet Limited - Effective, Functional, Standards Compliant

          IRC Nick: KingKoopa
          Skype ID: KingKoopa16
          • 10487 MODX Staff
          • 1,535 Posts
          Nice going, Kunal (and Susan). That’s an extremely nice addition to the Web Login grin
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 32241
            • 1,495 Posts
            Does this thing need to be added to the repository? If yes, please change the first post accordingly, such as the title to something more understandable as snippet, hack or module.
              Wendy Novianto
              [font=Verdana]PT DJAMOER Technology Media
              [font=Verdana]Xituz Media
              • 15914
              • 145 Posts
              I think Hack is more appropriate.
                Kunal Kapoor
                Technical Director
                Limesharp Internet Limited - Effective, Functional, Standards Compliant

                IRC Nick: KingKoopa
                Skype ID: KingKoopa16
                • 25663 MODX Staff
                • 12,272 Posts
                how about [Modification]
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 15914
                  • 145 Posts
                  Modification is what it is!
                    Kunal Kapoor
                    Technical Director
                    Limesharp Internet Limited - Effective, Functional, Standards Compliant

                    IRC Nick: KingKoopa
                    Skype ID: KingKoopa16
                    • 6726
                    • 7,075 Posts
                    WebsignupX tongue

                    lol

                    Anyway, I am late to the party but great work on this, I’ll most definitely want to use it systematically with websignup...
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 34017
                      • 898 Posts
                      I just noticed this thread and it was exactly what I was looking for.

                      Thanks
                        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