We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • This is an auto-generated support/comment thread for Web Edit Profile Snippet.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Allow web users to edit their profile
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 2762
      • 1,198 Posts
      Susan it’s a great needed snippet! I hope will be added in next relase smiley

      tested......but I have little issue:

      If you leave blank the password and new password fields, when you change another field , after saving the snippets overwrite the password value with a blank value smiley and you can only login with username and nothing in the password input field grin
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
      • Hm... I thought I dealt with the empty($_POST[’password’]) case, but I guess not! It’s a pretty simple-minded bit of code, so it shouldn’t be difficult to figure out what I missed.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 6726
          • 7,075 Posts
          Ditto there, great addition !
          A must have indeed...

          I’ll have a use for this in one of my upcoming MODx websites, I’ll give feedbacks soon smiley
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
          • Hah. I see where I got too clever for my own good. Line 86
             
                $rs2 = $modx->db->update("password = '".md5($password)."'",$modx->getFullTableName('web_users'),"id = ".$uid);
            

            should be
              if(!empty($_POST['password'])) {
                $rs2 = $modx->db->update("password = '".md5($password)."'",$modx->getFullTableName('web_users'),"id = ".$uid);
              }
            

            Originally my updates were done differently and the empty case was checked, but when I switched to the pretty db class function I forgot the check!

            The corrected webeditprofile.inc.php file is attached here...
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 2762
              • 1,198 Posts
              :) Hi Susan, i’ve tested your latest version :

              Your update fix the password issue but create a new little issue:

              after saving display an alert windows with this message ’’Unable to update profile at this time!’’
              the forms will be cleaned (all fields are empty), but the new value submitted.

              If you exit and come back in the user page all fields are ok smiley
                Free MODx Graphic resources and Templates www.tattoocms.it
                -----------------------------------------------------

                MODx IT  www.modx.it
                -----------------------------------------------------

                bubuna.com - Web & Multimedia Design
              • Ok, I know why it’s doing that, but it’s late and I’m too tired; I’ll fix it in the morning!
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                • Updated to version 1.2, with improved password change handling. Now only send email if password has been changed.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 2762
                    • 1,198 Posts
                    Great work Susan laugh works great now .

                    some questions/suggestions for next release grin

                    - an infotpl to display a User Info page (only to display and not to change info) (see Marc’s WebUserInfo Beta http://modxcms.com/forums/index.php/topic,6910.0.html)
                    - allow to change/display Gender, Comment and User Photo in the user profile

                    again great work Susan wink

                      Free MODx Graphic resources and Templates www.tattoocms.it
                      -----------------------------------------------------

                      MODx IT  www.modx.it
                      -----------------------------------------------------

                      bubuna.com - Web & Multimedia Design
                      • 2762
                      • 1,198 Posts
                      Quote from: banzai at Sep 26, 2006, 10:28 AM

                      .....
                      - an infotpl to display a User Info page (only to display and not to change info)

                      ......


                      Sorry Susan for this stupid request grin I only need a new chunck without input form laugh
                        Free MODx Graphic resources and Templates www.tattoocms.it
                        -----------------------------------------------------

                        MODx IT  www.modx.it
                        -----------------------------------------------------

                        bubuna.com - Web & Multimedia Design