Jump to content

how to inser new user directly in the db


_Nicola_

Recommended Posts

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

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

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:

  1. random data
  2. 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...