These are the files contained within Drupaltin 5.x-1.0a. View the source of the files online and collaborate on the coding. Please feel free to comment on the files and help us improve the product.
The structure for files goes as followed:

*Note- Do NOT use the contents of these files to install Drupaltin. Download the package and use those files.
; $Id: drupaltin.info,v 5.x-1.0a 2007/01/27 23:02:36 dries Exp $
name = Drupaltin
description = Adds functionality to allow users from vBulletin to log in and out of Drupal seamlessly
package =
version = VERSION
; Information added by drupal.org packaging script on 2007-01-15
version = "5.x-1.0a"
project = "drupal"<?php
// $Id: drupaltin.module,v 5.x-1.0a 2007/02/20 23:06:45 dries Exp $
/*============================================================================*\
|| -= Drupaltin =- ||
|| ||
|| By Jordan Starcher ||
|| drupaltin.module -> /drupal/modules/drupaltin/ ||
|| Engineered for Drupal 5.x & vB 3.6.x ||
|| Project Version 5.x-1.0a ||
|| File Version 1.01 ||
|| February 20, 2007 ||
|| Release under the GPL license ||
|| ||
|| Copyright ©2007 ||
|| http://www.TheOverclocked.com ||
\*============================================================================*/
/**
* Implementation of hook_help()
*/
function drupalvb_help($section = 'admin/help#drupaltin') {
switch ($section) {
case 'admin/modules#description':
return t("Integrates users from vBulletin into Drupal without sacrificing usability");
}
}
/**
* Implementation of hook_perm()
*/
function drupaltin_perm() {
return array('view drupaltin login');
}
/**
* Implementation of hook_block()
*/
function drupaltin_block($op = 'list', $delta = 0, $edit = array()) {
global $user;
if ($op == 'list') {
$blocks[0] = array('info' => t('Drupaltin login form'),
'weight' => 0, 'enabled' => 1, 'region' => 'left');
return $blocks;
}
else if ($op == 'configure' && $delta == 0) {
return $form;
}
else if ($op == 'view') {
switch($delta) {
case 0:
if (!$user->uid) {
$block['subject'] = t('User login');
$block['content'] = "<script type='text/javascript' src='http://forums.theoverclocked.com/clientscript/vbulletin_md5.js?v=364'></script><div><form action='http://forums.theoverclocked.com/login.php?do=login' method='post' onsubmit='md5hash(vb_login_md5password, vb_login_md5password_utf, 0' id='user-login-form'><div><input type='hidden' name='do' value='login' /><div><input type='hidden' name='url' value='/' /></div><div><input type='hidden' name='vb_login_md5password' /></div><div><input type='hidden' name='vb_login_md5password_utf' /></div><div><input type='hidden' name='s' value='' /></div><div><input type='hidden' name='url' value='http://www.theoverclocked.com' /></div></div>
<div class='form-item'><label for='edit-name'>Username: <span class='form-required' title='This field is required.'>*</span></label><div><input type='text' class='form-text required' name='vb_login_username' id='edit-name' size='15' maxlength='60' accesskey='u' tabindex='1' /></div></div>
<div class='form-item'><label for='edit-pass'>Password: <span class='form-required' title='This field is required.'>*</span></label><div><input type='password' class='form-text required' name='vb_login_password' id='edit-pass' size='15' maxlength='60' tabindex='1' /></div><div><label for='cb_cookieuser'><input type='checkbox' name='cookieuser' value='1' id='cb_cookieuser' tabindex='1' checked='checked' />Remember Me</label></div></div>
<div><input type='submit' class='button' value='Log In' accesskey='s' tabindex='1' /></div>
<div class='item-list'>
<ul>
<li><a href='http://forums.theoverclocked.com/register.php' title='Create a new user account.'>Create new account</a></li>
<li><a href='http://forums.theoverclocked.com/login.php?do=lostpw' title='Request new password via e-mail.'>Forgotten Your Password?</a></li>
</ul>
</div>
</form></div>";
}
return $block;
}
}
}
function drupaltin_logout() {
header('Location: drupaltin_logout.php?do=logout');
}
/**
* Implementation of hook_menu()
*/
function drupaltin_menu($may_cache) {
global $user;
if ($may_cache) {
$items[] = array('path' => 'drupaltin_logout', 'title' => t('Log Out'),
'callback' => 'drupaltin_logout',
'access' => $user->uid, 'weight' => '10', 'type' => MENU_NORMAL_ITEM);
}
return $items;
}
?><?php
/*============================================================================*\
|| -= Drupaltin =- ||
|| ||
|| By Jordan Starcher ||
|| drupaltin_config.php -> /vbforums/includes/ ||
|| Engineered for Drupal 5.x & vB 3.6.x ||
|| Project Version 5.x-1.0a ||
|| File Version 1.01 ||
|| February 17, 2007 ||
|| Release under the GPL license ||
|| ||
|| ||
|| Copyright ©2007 ||
|| http://www.TheOverclocked.com ||
\*============================================================================*/
/***************************************************************************\
* Info: Drupaltin is a vBulletin plugin to integrate Drupal with a *
* vBulletin forum. No Drupal or vB functionality is sacrificed, *
* as the core code remains unchanged and no tables are modified or *
* created in the vBulletin database. A Drupal module is also *
* provided to replace the Login form and Logout button. *
\***************************************************************************/
/***************************************************************************\
* - More info available at http://www.TheOverclocked.com/Drupaltin *
\***************************************************************************/
//////////////////////////////////////////////////
//+--------------------------------------------+//
//| Define the webserver and path parameters |//
//+--------------------------------------------+//
//////////////////////////////////////////////////
/**
* PATHS INFO ##### NO TRAILING SLASHES #####
*/
// Drupal server path
$drup_main_dir = '/var/www/theoverclocked.com';
// vBulletin server path
$vb_main_dir = '/var/www/forums.theoverclocked.com';
// Drupal http path
$drup_main_http = 'http://www.theoverclocked.com';
/**/ ####### Ignore this ####### /**/
/**/ class SystemComponent { /**/
/**/ var $settings; /**/
/**/ function getSettings() { /**/
/**/ ####### Ignore this ####### /**/
/**
* DRUPAL DATABASE INFO
*/
$settings['dbhost'] = 'localhost';
$settings['dbusername'] = '';
$settings['dbpassword'] = '';
$settings['dbname'] = 'drupal';
//////////////////////////////////////////////////////
//+------------------------------------------------+//
//| END Define the webserver and path parameters |//
//+------------------------------------------------+//
//////////////////////////////////////////////////////
//
// DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
///////////////////////////////////////////////////////////////////////
return $settings;
}
}
class DbConnector extends SystemComponent {
var $theQuery;
var $link;
//*** Function: DbConnector, Purpose: Connect to the database ***
function DbConnector(){
// Load settings from parent class
$settings = SystemComponent::getSettings();
// Get the main settings from the array we just loaded
$host = $settings['dbhost'];
$db = $settings['dbname'];
$user = $settings['dbusername'];
$pass = $settings['dbpassword'];
// Connect to the database
$this->link = mysql_connect($host, $user, $pass);
mysql_select_db($db);
register_shutdown_function(array(&$this, 'close'));
}
//*** Function: query, Purpose: Execute a database query ***
function query($query) {
$this->theQuery = $query;
return mysql_query($query, $this->link);
}
//*** Function: fetchArray, Purpose: Get array of query results ***
function fetchArray($result) {
return mysql_fetch_array($result);
}
//*** Function: close, Purpose: Close the connection ***
function close() {
mysql_close($this->link);
}
}
//////////////////////////////
//////// Dev Sandbox ////////
////////////////////////////
//INSERT INTO `role` (`rid`, `name`) VALUES ('', 'banned user');
//
//
//
?><?php
/*============================================================================*\
|| -= Drupaltin =- ||
|| ||
|| By Jordan Starcher ||
|| drupaltin_login.php -> /drupal/ ||
|| Engineered for Drupal 5.x & vB 3.6.x ||
|| Project Version 5.x-1.0a ||
|| File Version 1.01 ||
|| February 20, 2007 ||
|| Release under the GPL license ||
|| ||
|| ||
|| Copyright ©2007 ||
|| http://www.TheOverclocked.com ||
\*============================================================================*/
require_once('drupaltin_logout.php');
require_once($vb_main_dir . '/includes/drupaltin_config.php');
$connector = new DbConnector();
require_once('includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
if (!empty($_REQUEST['drupaltin_username']) && !empty($_REQUEST['drupaltin_password']) && !empty($_REQUEST['drupaltin_login_hash'])) {
$drupaltin_login_fetch = sprintf("SELECT created FROM users WHERE name = '%s'",
mysql_real_escape_string($_REQUEST['drupaltin_username']));
$drupaltin_login_connect = $connector->query($drupaltin_login_fetch);
$drupaltin_login_created = mysql_fetch_row($drupaltin_login_connect);
$drupaltin_login_hash = sha1($drupaltin_login_created['0']);
if ($drupaltin_login_hash === $_REQUEST['drupaltin_login_hash']) {
user_authenticate($_REQUEST['drupaltin_username'], $_REQUEST['drupaltin_password']);
unset($_REQUEST['drupaltin_username'], $_REQUEST['drupaltin_password']);
return $drupaltin_login_hash;
} else {
echo "CAUGHT YOU! Stop trying to hack or you will be prosecuted. If you feel you've reached this message in error, <br />
please notify the Administrator.";
exit;
}
}
?><?php
/*============================================================================*\
|| -= Drupaltin =- ||
|| ||
|| By Jordan Starcher ||
|| drupaltin_logout.php -> /drupal/ ||
|| Engineered for Drupal 5.x & vB 3.6.x ||
|| Project Version 5.x-1.0a ||
|| File Version 1.01 ||
|| February 20, 2007 ||
|| Release under the GPL license ||
|| ||
|| Copyright ©2007 ||
|| http://www.TheOverclocked.com ||
\*============================================================================*/
////////////////////////////////////
//+------------------------------+//
//| Define the path parameters |//
//+------------------------------+//
////////////////////////////////////
// vBulletin server path
$vb_main_dir = '/var/www/forums.theoverclocked.com'; ## NO TRAILING SLASH
////////////////////////////////////////
//+----------------------------------+//
//| END Define the path parameters |//
//+----------------------------------+//
////////////////////////////////////////
//
// DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
///////////////////////////////////////////////////////////////////////
$drupaltin_cwd = getcwd();
chdir($vb_main_dir);
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'login');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_login.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
if ($_REQUEST['do'] == 'logout')
{
process_logout();
}
chdir($drupaltin_cwd);
?><script type='text/javascript' src='http://forums.theoverclocked.com/clientscript/vbulletin_md5.js?v=364'></script><div><form action='http://forums.theoverclocked.com/login.php?do=login' method='post' onsubmit='md5hash(vb_login_md5password, vb_login_md5password_utf, 0' id='user-login-form'><div><input type='hidden' name='do' value='login' /><div><input type='hidden' name='url' value='/' /></div><div><input type='hidden' name='vb_login_md5password' /></div><div><input type='hidden' name='vb_login_md5password_utf' /></div><div><input type='hidden' name='s' value='' /></div><div><input type='hidden' name='url' value='http://www.theoverclocked.com' /></div></div>
<div class='form-item'><label for='edit-name'>Username: <span class='form-required' title='This field is required.'>*</span></label><div><input type='text' class='form-text required' name='vb_login_username' id='edit-name' size='15' maxlength='60' accesskey='u' tabindex='1' /></div></div>
<div class='form-item'><label for='edit-pass'>Password: <span class='form-required' title='This field is required.'>*</span></label><div><input type='password' class='form-text required' name='vb_login_password' id='edit-pass' size='15' maxlength='60' tabindex='1' /></div><div><label for='cb_cookieuser'><input type='checkbox' name='cookieuser' value='1' id='cb_cookieuser' tabindex='1' checked='checked' />Remember Me</label></div></div>
<div><input type='submit' class='button' value='Log In' accesskey='s' tabindex='1' /></div>
<div class='item-list'>
<ul>
<li><a href='http://forums.theoverclocked.com/register.php' title='Create a new user account.'>Create new account</a></li>
<li><a href='http://forums.theoverclocked.com/login.php?do=lostpw' title='Request new password via e-mail.'>Forgotten Your Password?</a></li>
</ul>
</div>
</form></div> $drupaltin_login_form = "<script type='text/javascript' src='http://forums.theoverclocked.com/clientscript/vbulletin_md5.js?v=364'></script><div><form action='http://forums.theoverclocked.com/login.php?do=login' method='post' onsubmit='md5hash(vb_login_md5password, vb_login_md5password_utf, 0' id='user-login-form'><div><input type='hidden' name='do' value='login' /><div><input type='hidden' name='url' value='/' /></div><div><input type='hidden' name='vb_login_md5password' /></div><div><input type='hidden' name='vb_login_md5password_utf' /></div><div><input type='hidden' name='s' value='' /></div><div><input type='hidden' name='url' value='http://www.theoverclocked.com' /></div></div>
<div class='form-item'><label for='edit-name'>Username: <span class='form-required' title='This field is required.'>*</span></label><div><input type='text' class='form-text required' name='vb_login_username' id='edit-name' size='15' maxlength='60' accesskey='u' tabindex='1' /></div></div>
<div class='form-item'><label for='edit-pass'>Password: <span class='form-required' title='This field is required.'>*</span></label><div><input type='password' class='form-text required' name='vb_login_password' id='edit-pass' size='15' maxlength='60' tabindex='1' /></div><div><label for='cb_cookieuser'><input type='checkbox' name='cookieuser' value='1' id='cb_cookieuser' tabindex='1' checked='checked' />Remember Me</label></div></div>
<div><input type='submit' class='button' value='Log In' accesskey='s' tabindex='1' /></div>
<div class='item-list'>
<ul>
<li><a href='http://forums.theoverclocked.com/register.php' title='Create a new user account.'>Create new account</a></li>
<li><a href='http://forums.theoverclocked.com/login.php?do=lostpw' title='Request new password via e-mail.'>Forgotten Your Password?</a></li>
</ul>
</div>
</form></div>";<?php
require_once(DIR . '/includes/drupaltin_config.php');
require_once($drup_main_dir . '/includes/bootstrap.inc');
$connector = new DbConnector();
$drupaltin_logout_cwd = getcwd();
chdir($drup_main_dir);
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
chdir($drupaltin_logout_cwd);
/**
* Dump the MD5 of the password the user entered into the Drupal database since vB doesn't store the password in pure MD5
*/
$dvb_md5 = md5($vbulletin->GPC['vb_login_password']);
$UpdateQuery = sprintf("UPDATE users SET pass = '%s' WHERE name = '%s'",
mysql_real_escape_string($dvb_md5),
mysql_real_escape_string($vbulletin->GPC['vb_login_username']));
$connector->query($UpdateQuery);
/**
* Start the Drupal session and push a cookie
*/
$name = $vbulletin->GPC['vb_login_username'];
$pass = $vbulletin->GPC['vb_login_password'];
user_authenticate($name, $pass);
// Sha1 the created
$drupaltin_login_fetch = sprintf("SELECT created FROM users WHERE name = '%s'",
mysql_real_escape_string($vbulletin->GPC['vb_login_username']));
$drupaltin_login_connect = $connector->query($drupaltin_login_fetch);
$drupaltin_login_created = mysql_fetch_row($drupaltin_login_connect);
$drupaltin_login_hash = sha1($drupaltin_login_created['0']);
// Setup for external cookie
$_POST['drupaltin_username'] = $vbulletin->GPC['vb_login_username'];
$_POST['drupaltin_password'] = $vbulletin->GPC['vb_login_password'];
$_POST['drupaltin_login_hash'] = $drupaltin_login_hash;
$drupaltin_login = include $drup_main_http . '/drupaltin_login.php';
if ($drupaltin_login != '1') {
echo "erm, could not set correct Drupal cookies. Notify the Administrator please!";
exit;
}
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
require_once($drup_main_dir . '/includes/bootstrap.inc');
$drupaltin_logout_cwd = getcwd();
chdir($drup_main_dir);
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
user_logout();
chdir($drupaltin_logout_cwd);
?><?php
if (file_exists(DIR . '/includes/drupaltin_config.php') == true)
{
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/**
* Backup the original users table so we can restore it if we need to
*/
$backup = "CREATE TABLE users_backup SELECT * FROM users";
if(!$connector->query($backup))
{
echo mysql_error();
exit();
}
/**
* Delete all the old data from the users table now that it has been backed up, prepares us for the new dump :)
*/
$truncate = "TRUNCATE TABLE users";
if(!$connector->query($truncate))
{
echo mysql_error();
exit();
}
/**
* Here is where we read the database values that we need from the vB database and drump them into the Drupal database
*/
$query = $vbulletin->db->query_read("SELECT userid, username, password, email, joindate, timezoneoffset FROM user");
while ($row = mysql_fetch_object($query))
{
$row->timezoneoffset = intval($row->timezoneoffset) * 3600;
$insert = 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', '', '', '%s', '0', '0', '1', '%s', '', '', '%s', 'a:0:{}')",
mysql_real_escape_string($row->userid),
mysql_real_escape_string($row->username),
mysql_real_escape_string($row->password),
mysql_real_escape_string($row->email),
mysql_real_escape_string($row->joindate),
mysql_real_escape_string($row->timezoneoffset),
mysql_real_escape_string($row->email));
if(!$connector->query($insert))
{
echo mysql_error();
exit();
}
}
} else {
echo "Missing drupaltin_config.php file. Please upload to /vbforums/includes/ and try again.";
}
?><?php
if (file_exists(DIR . '/includes/drupaltin_config.php') == true)
{
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/**
* Delete all the old data from the users table, prepares us for the dumping the old users :)
*/
$truncate = "TRUNCATE TABLE users";
if(!$connector->query($truncate))
{
echo mysql_error();
exit();
}
/**
* Here is where we read the database values that we need from the vB database and drump them into the Drupal database
*/
$query = $connector->query("SELECT `uid`, `name`, `pass`, `mail`, `mode`, `sort`, `threshold`, `theme`, `signature`, `created`, `access`,
`login`, `status`, `timezone`, `language`, `picture`, `init`, `data` FROM `users_backup`;");
while ($row = mysql_fetch_object($query))
{
$insert = 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', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
mysql_real_escape_string($row->uid),
mysql_real_escape_string($row->name),
mysql_real_escape_string($row->pass),
mysql_real_escape_string($row->mail),
mysql_real_escape_string($row->mode),
mysql_real_escape_string($row->sort),
mysql_real_escape_string($row->threshold),
mysql_real_escape_string($row->theme),
mysql_real_escape_string($row->signature),
mysql_real_escape_string($row->created),
mysql_real_escape_string($row->access),
mysql_real_escape_string($row->login),
mysql_real_escape_string($row->status),
mysql_real_escape_string($row->timezone),
mysql_real_escape_string($row->language),
mysql_real_escape_string($row->picture),
mysql_real_escape_string($row->init),
mysql_real_escape_string($row->data));
if(!$connector->query($insert))
{
echo mysql_error();
exit();
}
}
/**
* Drop the old users_backup table since we no longer need it
*/
$drop = "DROP TABLE users_backup";
if(!$connector->query($drop))
{
echo mysql_error();
exit();
}
} else {
echo "Missing drupaltin_config.php file. Please upload to /vbforums/includes/ and try again.";
}
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/*
* Update timezone in the Drupal database
*/
$vbulletin->GPC['timezoneoffset'] = intval($vbulletin->GPC['timezoneoffset']) * 3600;
$UpdateQuery = sprintf("UPDATE users SET timezone = '%s' WHERE name = '%s'",
mysql_real_escape_string($vbulletin->GPC['timezoneoffset']),
mysql_real_escape_string($vbulletin->userinfo['username']));
$connector->query($UpdateQuery);
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/*
* Update the email and password in Drupal upon changing
*/
if ($vbulletin->GPC['newpassword']) {
$UpdateQuery = sprintf("UPDATE users SET pass = '%s' WHERE uid = '%s'",
mysql_real_escape_string($vbulletin->GPC['newpassword']),
mysql_real_escape_string($vbulletin->userinfo['userid']));
$connector->query($UpdateQuery);
}
$UpdateQuery = sprintf("UPDATE users SET mail = '%s' WHERE uid = '%s'",
mysql_real_escape_string($vbulletin->GPC['email']),
mysql_real_escape_string($vbulletin->userinfo['userid']));
$connector->query($UpdateQuery);
$UpdateQuery = sprintf("UPDATE users SET init = '%s' WHERE uid = '%s'",
mysql_real_escape_string($vbulletin->GPC['email']),
mysql_real_escape_string($vbulletin->userinfo['userid']));
$connector->query($UpdateQuery);
?><?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;
}
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/*
* Delete user from Drupal when they get pruned
*/
$DeleteQuery = "DELETE FROM users WHERE userid IN ($userids)";
$connector->query($DeleteQuery);
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/**
* Delete the user from the Drupal database
*/
$DeleteQuery = sprintf("DELETE FROM users WHERE uid='%s'",
mysql_real_escape_string($this->existing['userid']));
$connector->query($DeleteQuery);
?><?php
require_once(DIR . '/includes/drupaltin_config.php');
$connector = new DbConnector();
/*
* Update username when changed by an admin
*/
if ($doupdate) {
$UpdateQuery = sprintf("UPDATE users SET name = '%s' WHERE uid='%s'",
mysql_real_escape_string($this->dbobject->escape_string($username)),
mysql_real_escape_string($userid));
$connector->query($UpdateQuery);
}
?>