Log in

View Full Version : How do I use my own unique userids ?


ipletikosic
12-28-2006, 05:08 PM
I m trying to tie user records in vBulletin with my existing user database.

Ideally on register.php I would get a userid from the existing database and set it on the $userdata object:

$userid = $remoteDb->getUserIdForUsername($vbulletin->GPC['username']);
$userdata->set('userid', $userid);

but this does not work. The userid I set is ignored.

I would rather not modify the schema of the database since it seems adding a new field carries a host of additional modifications to the class_dm*.php files.

How would you recommend I create a link betwen the forum user table and the remote user table? Using username & emails is not feasible since if the user updates on either system the link is broken.

Thanks,

Ivo

Marco van Herwaarden
12-28-2006, 05:38 PM
You should not try to set a different userid then the one vBulletin generates. You could add a new column to the table, no need to modify any files for that. Or use a User Profile Field to store the external id.