1 (edited by Linux_InSide 2004-08-17 16:08)

Topic: Question, Merge Forum Database to My Members Based DB?

hi their

i am looking into seeing if its possible to merge a database (supplied below) from my members based website to the PunBB forum, so when members loginto my website they also can start using the forum without having to re-login to the forum, members passwords on my website are encrypted with salt,


heres the sql database from my members based website,

CREATE TABLE `user` (
  `userid` int(5) NOT NULL auto_increment,
  `username` varchar(20) NOT NULL default '',
  `password` varchar(32) NOT NULL default '',
  `salt` char(3) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `real_name` varchar(100) NOT NULL default '',
  `hide_email` tinyint(1) NOT NULL default '0',
  `can_approve` tinyint(1) NOT NULL default '0',
  `can_admin` tinyint(1) NOT NULL default '0',
  `can_gallery_mod` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`userid`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;


thank-you,
Linux_InSide

Re: Question, Merge Forum Database to My Members Based DB?

please can someone help me.

3

Re: Question, Merge Forum Database to My Members Based DB?

Look at this thread: http://punbb.org/forums/viewtopic.php?id=4121

Maybe you can look at the code from this plugin to get an idea how to add your users.

Re: Question, Merge Forum Database to My Members Based DB?

you see my site uses SALT by the looks of it i could be wrong but the PunBB forum does'nt, can someone tell me otherwise?

5 (edited by Julik 2004-08-28 10:24)

Re: Question, Merge Forum Database to My Members Based DB?

If you can afford it you can use PostgreSQL.

Then you can map your users table into a view looking like the punbb_users table. Then you can define rules for INSERT and UPDATE on punbb_users and your systems will be transparently integrated. An hour of careful work is needed though.

For encryption look for function punbb_hash in punBB sources, there you can change the encryption mechanism used for passwords and cookies to something of your taste, even substitute a call to your own hashing routine.

If you want to stay with MySQL and your table you are set for some serious hacking on the punBB source (I am not sure that MySQL supports rules and triggers, although it definitely supports views in the latest version).