UMAIR ALI
UMAIR ALI

Reputation: 1115

Password encryption in joomla

I am creating user with web service in joomla. this is my password encryption code

    $password= $_GET["password"];

$salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword($password);
$password = $crypt . ':' . $salt;

but if i am trying to login in website with this password. Password not match with database. I am using joomla version 1.5 Please give any suggestion

Upvotes: 0

Views: 461

Answers (1)

Techie
Techie

Reputation: 45134

In Joomla 2.5 user table passwords are saved as MD5 hashed strings. If you are to created a new user, You will have to generated a MD5 hashed password for the user as well as assign the user to a particular group which are saved in the user group table.

Read more

How can I create a new Joomla user account from within a script?

http://forum.joomla.org/viewtopic.php?p=2114878

Advise

$password= $_GET["password"]; <--- This is not a good idea. NEVER

Upvotes: 1

Related Questions