Re: PHP Script to open phpBB2 accounts
| From: | Wolf | Date: | Thu, 20 Apr 2006 14:00:25 +0000 |
| Subject: | Re: PHP Script to open phpBB2 accounts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234390@lists.php.net to get a copy of this message | ||
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@yourdomain.com', '',
'', '',
'', '', '', 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