_Nicola_ Posted May 9, 2013 Share Posted May 9, 2013 hi, i'm running prestashop 1.5.4.1 but i need to share the users between prestashop and drupal. is there any modules that do that? if not i need the table and the columns affected by the insert, so i can create a script to create the account in both cms. Link to comment Share on other sites More sharing options...
vekia Posted May 9, 2013 Share Posted May 9, 2013 hi, i'm running prestashop 1.5.4.1 but i need to share the users between prestashop and drupal. is there any modules that do that? if not i need the table and the columns affected by the insert, so i can create a script to create the account in both cms. i don't know any module for that table for customers is: ps_customer ps_customer_group Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 I have found the table (it affect only ps_customer with fast registration), but i have not found how prestashop sets the password (i'have tried MD5 but it doesn't work) and secure_key Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2013 Share Posted May 10, 2013 prestashop password is based on password string + salt (salt.passwd) what does it mean? In cryptography, a salt is random data that are used as an additional input to a one-way function that hashes a password or passphrase. so prestashop password hash containts two things: random data password random data is a _COOKIE_KEY_ and password is user string pass _COOKIE_KEY_ - is located in confing/settings.inc.php - and this is SALT string. Conclusion the password is: md5(_COOKIE_KEY_.$passwd); hope it helps :-) Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 i had already found it but thank you now i can login but i can only see logo and mobile theme link, no smarty, i don't know what to do. i think is something related to securekey, but i cann't prove it Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 (edited) i will try again Edited May 10, 2013 by scattolin (see edit history) Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 there was a missing row in the ps_customer_group, once added the row it works Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 just to do things correct, what is securekey? with what have i to fill it? as now i'm filling it with md5(uniqid(rand(), true)) am i correct? Link to comment Share on other sites More sharing options...
zero22hero Posted May 10, 2013 Share Posted May 10, 2013 just to do things correct, what is securekey? with what have i to fill it? as now i'm filling it with md5(uniqid(rand(), true)) am i correct? md5(_COOKIE_KEY_.$passwd); _COOKIE_KEY_ can be found in \prestashop\config\settings.inc.php for example: md5(FqIGYYdU2E8W1EGk5ZqCo2K9PZzww0AYP2bCTKC6KkfLumhOIkuuY6VCmypassword). And now the password for new user is: mypassword Does it meet your requirement now? Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 not COOKIE_KEY but securekey, one of the colums on the table Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2013 Share Posted May 10, 2013 you should use cookie_key as securekey in table :-) i hope so, does it work? Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 10, 2013 Author Share Posted May 10, 2013 the login works even whithout securekey, but i have read somewhere that securekey is used for the restore password link. for the problem as i said before, after adding the user id and the group id in the table customer_group works. now i have to work on drupal to make it at least create an account in both CMS 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