RE: PHP Script to open phpBB2 accounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

My 1st thought was to look at the mysql query log and see what it takes
To create a user. After looking at the set of queries I understood that I
Didn't want to go directly to the DB and bypass the phpBB logic.

I managed to find a script that uses the minimum phpBB internal
functions to create a user. After some more fixing it actually
Opens a user so if anyone needs it :

http://www.weberdev.com/get_example-4383.html

I'm still working on it but the current version works.

Thanks.

berber



-----Original Message-----
From: Wolf [mailto:LoneWolf@xxxxxxxxx] 
Sent: Thursday, April 20, 2006 4:00 PM
To: Weber Sites LTD
Cc: 'Stut'; php-general@xxxxxxxxxxxxx
Subject: Re:  PHP Script to open phpBB2 accounts

OK, so maybe this just seems moot, but...

Weber Sites LTD wrote:
> Yes, both sites are on the same server but weberdev was built by me 
> And weberforums is phpBB2. No sense in writing my own forums application.
Same server means you can look at the database

> WeberDev is the main site and has it's own user base and phpBB2 is 
> Pretty complex and I didn't have the time to create a single logon. It 
> Will not be trivial and will need to be maintained with every phpBB2 
> Upgrade.

Yeah, I don't see a problem with that one..

> All I want is to open a phpBB account when someone opens one On 
> WeberDev.

So, when you open a weberDev account, have your creation script go through
and load the phpBB Database set and run through the same user login
information, dumping it into the phpBB database fields itself.

frankly put, the install MySQL schema has:
# -- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate,
user_password, user_email, user_icq, user_website, user_occ, user_from,
user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim,
user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml,
user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline,
user_rank, user_avatar, user_lang, user_timezone, user_dateformat,
user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1,
'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0,
0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);

# -- username: admin    password: admin (change this or remove it once
everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate,
user_password, user_email, user_icq, user_website, user_occ, user_from,
user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim,
user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml,
user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm,
user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone,
user_dateformat, user_actkey, user_newpasswd, user_notify, user_active)
VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3',
'admin@xxxxxxxxxxxxxx', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1,
0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);

So, using that information, make your weberdev connect to the phpBB database
(you have all that information already as you had to set it up), and use 1
script to make them both.

Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux