MyBB Community Forums

Full Version: sql queary to add users in to database from drupal for link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i am trying to make an drupal module that adds the user data into the mybb database once the user has joined i have all ready done the mybb to druapl side so when an user joins at mybb they get an acount at the drupal side as well

but now i am trying to make an drupal module that ads the data into the mybb database when an user joins at drupal. i have looked in member.php but i cant seem to find sql query and functions that ads the user when an new joins the mybb fourms am i missing something in the member.php file that dose this.

i also plan on reasing this mybb and drupal link for free for all to use

i all ready have the drupal module ready i just need the code that adds the data i need it to the mybb database with of course changing the variables to make the ones at druapl uses

thank you for your help
inc/datahandlers/user.php::insert_user() is probably what you're looking for?
so would i need to include inc/datahandlers/user.php in my drupal module

php include so that i get all the fuctions and then insert the username and password via an quary in to the mybb database so that the salt and loginkey ect gets added in as well ?


as i still dont see an qeary in the function insert_user()

just ready to set it up ?
insert_users() builds an array and passes it to $db->insert_query() which in turn builds the actual SQL query. You don't really want to include that file into Drupal, just build your own query there.
i cant seem to find the query i cant make an simple query as mybb has an salt and an login key ? so where do i find the query that $db->insert_query() is making and using[/i]
anyone got any more ideas ? i would really love to make this link for mybb and share with everyone
is the salt in the mybb database just an simple md5 string

as i need to work this out and the login key to build my own query

thank you for your help
Tazfan, here is how it works:
  • A "salt" is a string of 8 random chars (0-9, A-Z, a-z)
  • A "password" (in DB) is md5(md5(salt)+md5(pass)), where "pass" is plain-text password
  • A "login key" is just a string of 20 random chars
thank you for the exta help iarspider i am going to go try and code this up