With the fact you are using a custom built page, there should be no problems on dropping your site user table and base the page onto the vbulletin user table.
I wrote a custom "cms" for our page as well, and I'm hooking into the vbulletin user table for authentication on site (the login is handled by vbulletin completely).
Here's a snippet of my custom security/user class
PHP Code:
function auth_phpbb($data, $passwd) {
return false;
}
function auth_vbulletin($data, $passwd) {
/*
* Passwortchecks
*/
if ($data['salt'] != "") {
$passwdMD5 = md5( md5( $passwd ) . $data['salt'] );
} else {
$passwdMD5 = md5( $passwd );
}
if ($passwdMD5 == $data['password']) {
$_SESSION['oSession']['userinfo'] = array (
'userid' => $data['userid'],
'username' => $data['username']
);
session_regenerate_id();
return true;
} else {
unset( $_SESSION['oSession']['userinfo'] );
return false;
}
}
function authenticate($system = 'DEFAULT') {
if ( $system=='DEFAULT' ) {
$system='auth_'.$this->config["main"]["authsystem"];
} else {
$system='auth_'.$system;
}
if (!method_exists($this,$system)) {
return false;
}
if (
isset($_POST['login']) &&
is_array($_POST['login']) &&
!empty($_POST['login']['username']) &&
!empty($_POST['login']['password'])
) {
$data = $this->getUser(htmlentities(strip_tags($_POST['login']['username']),ENT_QUOTES));
if (
$data &&
(
$this->isMemberOfGroup($data['userid'],4) || // Mitglieder
$this->isMemberOfGroup($data['userid'],6) || // Trials
$this->isMemberOfGroup($data['userid'],1) || // Administratoren
$this->isSuperAdmin($data['userid']) // SuperAdmins
)
) {
return call_user_method($system, $this, $data, $_POST['login']['password']);
}
}
return false;
}
Maybe it's helpfull.
Cheers
Jens