I want to create my own PHP page that adds users to concrete as basic users.

I have done some searching as see that Concrete uses SALT encryption.

How do I convert an entered password into a password that is compatible with concrete?

I am confiused because "By default PHP uses a two character DES salt string, however if your system standard is MD5, a 12-character salt string is used." but the password_salt in the site.php is longer than the standard MD5.

How can I, in php, convert a string such as "123456" into a password that I can enter in to the MySQL database?

Many thanks

View Replies:
Remo replied on at Permalink Reply
the input length doesn't matter. you can hash a string with 1000 characters using md5.

It's probably the safest way to check out the code. I guess the salt isn't been used a lot of times..
Tony replied on at Permalink Reply
User::encryptPassword($password, PASSWORD_SALT);
ashleyh81 replied on at Permalink Reply
If I have the password which is a value $password.

Then what php script do I need to save this as an $encryptedpassword value?

Many thanks for your prompt replies !
Remo replied on at Permalink Reply
A script that runs within the concrete5 framework to make sure you can access User::encryptPassword
ashleyh81 replied on at Permalink Reply
Sorry I am creating an external page where user register, this will then register them on concrete5 but also in a phpbb database.

What I am trying to achieve is through this external script to concrete5 is where a user registers but it creates the relevant encrypted password so that I can do a MySQL insert command to add them as a user.

Many thanks
gmurillo replied on at Permalink Reply
Hi, you can do this?