We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36575
    • 104 Posts
    Thanks for this. I followed it yesterday and I have a working Login/Registration/Profile on my site. The email confirmation oart is not working yet and I suspect that’s because I am developing locally, or I need to install something else to send emails. Either way, I took that part out at least for testing.
    Thanks again for doing great tutorials. Once I learn a little more I hope I can make some tutorials, too.

      • 3749
      • 24,544 Posts
      Quote from: rachelmarama at Mar 12, 2011, 03:52 PM

      Thanks for this. I followed it yesterday and I have a working Login/Registration/Profile on my site. The email confirmation oart is not working yet and I suspect that’s because I am developing locally, or I need to install something else to send emails. Either way, I took that part out at least for testing.
      Thanks again for doing great tutorials. Once I learn a little more I hope I can make some tutorials, too.

      Developing locally usually means no mail server, but you can still use SMTP (e.g., a GMail account) if you set the MODx SMTP System Settings properly.
        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
        • 22019
        • 390 Posts
        Haven’t been through your tutorial in detail but there’s one small discrepancy in your Profile and Update Profile examples - the mobilephone field name in one is referenced as [[+cellphone]] and in the other as [[+mobilephone]].

        If you want to add Gender to profile you do this:

             <label for="gender" class="label">Gender
                    <span class="error">[[+error.gender]]</span>
                </label>
                <select name="gender" id="gender">
         <option value="" />Please select</option>
         <option value="1" />Male</option>
         <option value="2" />Female</option></select>


        The DOB field is stored as a UNIX timestamp, but there’s no built in way in the Register or UpdateProfile snippets to do that transformation for you - I guess it can be done as a preHook.


          Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
          • 3866 ☆ A M B ☆
          • 350 Posts
          Oh good spot. I’ve made the change on the tutorial. I would very much like to make use of the DOB field but as yet this doesn’t seem to be an option, as you rightly say it returns a UNIX timestamp. sad
            Helen Warner
            Number one pixel!
            Proud to be linked with MODX at Crimson Pixel
            • 25586
            • 105 Posts
            Quote from: odeclas at Mar 13, 2011, 06:21 AM

            Haven’t been through your tutorial in detail but there’s one small discrepancy in your Profile and Update Profile examples - the mobilephone field name in one is referenced as [[+cellphone]] and in the other as [[+mobilephone]].

            If you want to add Gender to profile you do this:

                 <label for="gender" class="label">Gender
                        <span class="error">[[+error.gender]]</span>
                    </label>
                    <select name="gender" id="gender">
             <option value="" />Please select</option>
             <option value="1" />Male</option>
             <option value="2" />Female</option></select>


            The DOB field is stored as a UNIX timestamp, but there’s no built in way in the Register or UpdateProfile snippets to do that transformation for you - I guess it can be done as a preHook.

            I would like to ouput the gender field in the profile as a selectbox. How can I do this? I have this:
            			<select name="gender" id="gender">
            				<option value="1">Male</option>
            				<option value="2">Female</option>
            			</select>


            But everytime I reload the page, the Male is selected. How can I auto select if the user is a famale?

            EDIT:

            I think I also counts for bullets and checkboxes. How to implement these values in the profile page?
              • 25978
              • 1 Posts
              Hi,

              I seem to be having problems with the forgot password portion. The password generated and sent to my email doesn’t seem to work. It still has the previous password saved.

              say my password is pass1 and i forgot it and go to the forgot password link and it emails me a new password of: pass2 the new password won’t work but pass1 would still work. Does anyone have that problem? Seems like it’s not erasing the old password and putting the new on in the db?
                • 34108
                • 66 Posts
                Thanks very much for this tutorial Muggins smiley

                One quick question - for the Change Password functionality, the PDF refers to a Change Password snippet...

                "‘Change Password’ resource using ChangePassword snippet:"

                ...but I can’t seem to find this snippet anywhere in the Login package (I’m using the latest version - Login 1.6.2 - on MODX Revolution 2.1.1-pl (traditional)).

                Did this snippet used to exist in a previous version of Login and has since been removed? Or does anyone have the code I can use to manually create a ChangePassword snippet?

                Many thanks,
                Harmony
                  • 3749
                  • 24,544 Posts
                    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
                    • 34108
                    • 66 Posts
                    Thanks Bob, you’re a rockstar grin
                      • 7045
                      • 225 Posts
                      Great tut, I appreciate the hard work. I have what appears to be a strange issue with the ChangePassword, and I don’t think this is intended behavior. Everything from registration to forgot password is working great. However, when I try to change the password, I get a popup box asking me which user I want to change it for. The list even includes my admin account. This can’t be right? Now if I select one, it works. It does change the password, but this box can’t be right.

                      The only thing I can think of is possibly the fact I am using the email address as the username may be causing havoc. Maybe I didn’t take all the appropriate precautions to use the email address this way? I did add "&usernameField=`email`" to my register call. It appears to be working in all aspects.