Jump to content

How to create new user account manually


amir hossein

Recommended Posts

hello

how can we make a module that create a new account for user manually?

how can we understand that witch data we should get from user to sign he/she up ?

 

should we create an account for user by creating a new row in presta database ? so witch table ?

thanks

 

Link to comment
Share on other sites

'ADD NEW Employee
SQL = "INSERT INTO ps_employee (id_profile, id_lang, lastname, firstname, email, passwd, active, stats_date_from, stats_date_to, default_tab, bo_theme, bo_show_screencast) VALUES ("
SQL +=Profile_ID & ", " & Language_ID & ", '" & SureName & "', '" & Name & "', '" & Email & "', '" & PW
SQL += "', 1,"
SQL += "'" & Now().ToString("yyyy-MM-dd") & "', '" & Now().ToString("yyyy-MM-dd") & "', 31 ,'default', 0);"
cmd = New MySqlCommand(SQL, conn)
cmd.ExecuteNonQuery()
cmd.Dispose()
SQL = "SELECT id_employee FROM ps_employee WHERE lastname='" & Surename & "' AND firstname='" & Name & "';"
cmd = New MySqlCommand(SQL, conn)
Employee_ID = cmd.ExecuteScalar
cmd.Dispose()
'You have to insert the employees in every shop
SQL = "INSERT INTO ps_employee_shop (id_employee, id_shop) VALUES (" & Employee_ID & ", " & Shop_ID ");"
cmd = New MySqlCommand(SQL, conn)
cmd.ExecuteNonQuery()
cmd.Dispose()

         

Here is some code I used to add users, it's in VB.NET but you have the query's so you know what to do.

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...