I want to replicate the way WordPress encrypts a password for a new user (wp_user.user_pass) in WordPress 2.7.1.
However, I want to encrypt the password in SQL code inserting into MySQL rather than through PHP. This is so that I can bypass the WordPress Admin/Dashboard section to create new users, instead creating new users through a SQL Insert statement into the WordPress MySQL database.
I believe that WordPress 2.5+ onwards uses ‘Salted Passwords’ using the PasswordHash PHP class (http://www.openwall.com/phpass/) to store passwords. I have also found the mod_auth_mysql Apache module (http://modauthmysql.sourceforge.net/) but neither of these appear to have any SQL code directly or suit my problem exactly.
Does anyone know how to encrypt passwords for new WordPress Users in a SQL INSERT or UPDATE statement that replicates the way WordPress encrypts passwords using PHP?
- The topic ‘Encrypt WordPress User passwords using SQL rather than PHP?’ is closed to new replies.