Im not sure if this is ok, see, Im not very familiar with PHP so I wonder if anyone can let me borrow a script that converts strings to Salted MD5 (The one Joomla uses for password in the database).

I hope to convert multiple lines in 1 go. I'm adding hundreds of user in Joomla so adding them directly in database is much faster.

Thank you very much!

  • 1
    Joomla 3.2+ uses Bcrypt, not MD5 ;)
    – Lodder
    Commented Feb 24, 2016 at 10:21

1 Answer 1


The best way to be 100% is to import users and generate passwords with:

        $password = JUserHelper::genRandomPassword();
        $params = array(
                        'name' => $name,
                        'username' => $username,
                        'email' => $email,
                        'password' => $password,
                        'password2' => $password
                        'groups' => array(2),
                        'sendEmail' => 0,
                        'block' => 0
        $user = new JUser(0);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.