register_addmember_complete

<?php
require_once(DIR . '/includes/drupaltin_config.php');


//*** Figure out the timezone settings and convert them to work in the Drupal vB
//    Divided by 3600 b/c the Drupal system.module timezone form is in seconds  
$vbulletin->GPC['timezoneoffset'] = intval($vbulletin->GPC['timezoneoffset']) * 3600;

## Connect to Drupal database and dump the values
$connector = new DbConnector();

$insertQuery = sprintf("INSERT INTO `users` (
    `uid`, `name`, `pass`, `mail`, `mode`, `sort`, `threshold`, `theme`, `signature`, `created`, `access`, `login`,
     `status`, `timezone`, `language`, `picture`, `init`, `data`)
    VALUES ('%s', '%s', '%s', '%s', '0', '0', '0', '', '', '0', '0', '0', '1', '%s', '', '', '%s', 'a:0:{}')"
,
       
mysql_real_escape_string($vbulletin->userinfo['userid']),
       
mysql_real_escape_string($vbulletin->GPC['username']),
       
mysql_real_escape_string($vbulletin->GPC['password_md5']),
       
mysql_real_escape_string($vbulletin->GPC['email']),   
       
mysql_real_escape_string($vbulletin->GPC['timezoneoffset']),
       
mysql_real_escape_string($vbulletin->GPC['email']));

   
## Save the form data into the database
   
if ($result = $connector->query($insertQuery)){

       
## It worked
       
return;

    }else{

       
## It hasn't worked so stop. Better error handling code would be good here!
       
exit;

    }
?>