progproger Posted November 30, 2011 Share Posted November 30, 2011 Hi gyus I want to update customer's password from database... I am changing "passwd" column in "ps_customer"-s table... Off course first of all i'm generating it to md5 and then update it. But after that i just can't login.It tells me that "Authentication failed"... What should i do? Kind Regards Link to comment Share on other sites More sharing options...
luci1 Posted December 1, 2011 Share Posted December 1, 2011 Hi, It's because the password is encrypted with the encrypt function from the Tools.php class. Give a try with this function, it should work. 1 Link to comment Share on other sites More sharing options...
progproger Posted December 1, 2011 Author Share Posted December 1, 2011 Hi, It's because the password is encrypted with the encrypt function from the Tools.php class. Give a try with this function, it should work. Sorry i don't understand what do you mean...Can you explain me with more details please? Thanks Link to comment Share on other sites More sharing options...
luci1 Posted December 1, 2011 Share Posted December 1, 2011 Here is the code of the encrypt function : public static function encrypt($passwd) { return md5(pSQL(_COOKIE_KEY_.$passwd)); } You can see it use md5 funtion but the password is concateneted with the _COOKIE_KEY_ variable which is defined in config/settings.inc.php. So tu update passwords you had to concatenate them with this variable before using the md5 function. 1 Link to comment Share on other sites More sharing options...
progproger Posted December 2, 2011 Author Share Posted December 2, 2011 Here is the code of the encrypt function : public static function encrypt($passwd) { return md5(pSQL(_COOKIE_KEY_.$passwd)); } You can see it use md5 funtion but the password is concateneted with the _COOKIE_KEY_ variable which is defined in config/settings.inc.php. So tu update passwords you had to concatenate them with this variable before using the md5 function. Thank you so much! Kind regards Link to comment Share on other sites More sharing options...
luci1 Posted December 2, 2011 Share Posted December 2, 2011 You're welcome, Can you add [sOLVED] ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now