Create users in an alternate database

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
vbtrek
Registered User
Posts: 10
Joined: Tue Jun 29, 2004 8:31 am

Create users in an alternate database

Post by vbtrek »

Can anyone point me in the right direction, when a user registers on our forum, i'd like to write the username and unencrypted password to another database on the same server as our forum.

We use a SQL2005 database for both databases, and phpbb 2.0.19.

I would have used a SQL trigger but we need the password before it's encrypted in the users table.

Any help would be much appreciated.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: Create users in an alternate database

Post by drathbun »

What are you going to use the other table for?

Reason I ask is questions that relate to storing a user's password as clear text or logging them somehow are generally viewed as being less than desirable actions. :)
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
vbtrek
Registered User
Posts: 10
Joined: Tue Jun 29, 2004 8:31 am

Re: Create users in an alternate database

Post by vbtrek »

Fair point, it is for the knowledgebase software we're using (http://www.instantasp.co.uk/Products/InstantKB/) and it's really just to make life easy for our customers so they don't have to register on both the forum and knowledgebase separately. The InstantKB database stores user data in a very basic form in it's InstantKB_Users table the UserName and Password are just stored in plain text.

Thanks for the reply.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: Create users in an alternate database

Post by drathbun »

One brief statement about that and then I'll give you a tip as to where to look... you really should not store passwords as clear text. :) So you might want to see if there is anything that can be done about that.

If you look in includes/usercp_register.php you will find where the 3 insert statements are run that create a new user in phpBB2. You can add a fourth insert statement to create a record in your table, and the password is - at that point in the code - available as the user entered it on the form.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Create users in an alternate database

Post by 3Di »

vbtrek wrote:We use a SQL2005 database for both databases, and phpbb 2.0.19.
On a side note i strongly encourage you to update to the latest 2.0.23 phpBB2. ;)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “[2.0.x] MOD Writers Discussion”