We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33480
    • 27 Posts
    Hello,

    i’ll be porting an old website to MODX.

    The older website’s users table does not have its PASSWORD field ecnrypted, unlike that of MODX.

    Questions:

    1. what function should I run against the old passwords to encrypt them according to MODX password specs?

    2. if I choose to retain the old scheme of unencrypted password (this way i can send the passwords to the users upon request, avoiding password RESETS in case lost or forgotten), what specific files would i need to tweak, and which part?

    thanks in advance!

    this is my second website project with MODX. The ease of development i experienced with my first website was superb! grin So am porting the other websites one at a time.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Passwords need to be encrypted. Use the MD5 function to encrypt them.
        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
        • 33480
        • 27 Posts
        Quote from: sottwell at Apr 02, 2008, 06:46 AM

        Passwords need to be encrypted. Use the MD5 function to encrypt them.

        thanks, how about for option 2, so that passwords may be RESENT and not RESET. Am planning to device another form of encryption, something that may be decrypted back so the passwords may be resent later on request.

        for this, what specific files do i have to work on?

        thanks.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          For manager users...
          manager/processors/login.processor.php, line 177
          manager/processors/save_password.processor.php, line 24
          manager/processors/save_user.processor.php, lines 154 and 267

          For web users...
          manager/processors/save_web_user.processor.php, lines 132 and 243
          assets/snippets/weblogin/weblogin.processor.inc.php, lines 30 and 295
          assets/snippets/weblogin/websignup.inc.php, line 110
          assets/snippets/weblogin/webchangepwd.inc.php line 46

          If you’re using WebLoginPE you’ll need to search those files for any of this.
            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
            • 33480
            • 27 Posts
            ok thanks a lot!
              • 33480
              • 27 Posts
              Hi,

              I SUCCESSFULY ported usernames and passwords (converted to md5) for WEB USERS, and was successful logging them in.

              However, i get errors when trying to login manager-users. MODX displays "Incorrect username or password entered!" for every login on the manager control panel.

              For the above usernames, I am using an email format:

              eg: [email protected]/password

              here are my procedures in porting the old USER TABLE to MODX.

              1. Insert username (email) and password (used md5) to modx_web_users
              2. Inserted other data to modx_web_user_attributes setting internalKey to the id of the record inserted in modx_web_users (#1)
              3. Added corresponding record to the modx_web_group, webgroup (1-admin, 2-webuser), and the webuser(id #1)

              The above procedure successfully logged the webusers but failed on web managers.

              Are there other MODX table that I failed to update for the web managers?

              Thanks!