I'm looking to write a converter for my custom user database of about 300 users. I have a very simple setup (sort of derived from my expirence with phpBB2), here are my columns:
user_id, username, email, user_password, ip, regdate, user_level, user_session_time, user_active, user_lastvisit, activation_key, email_activation_key, new_email, pass_actkey, new_pass, newsletter
I do see several parallels to Olympus that will make converting fairly easy, but I have a few questions concerning some of the new or confusing columns in Olympus.
username_clean - appears to be a clean up of the username field (obviously) would I be okay with just strlowering all the uppercase words? (no usernames contain forgin characters). Otherwise I can use the function built into Olympus to clean the usernames.
user_passchg - I am guessing this is the time the password was either LAST changed, or the time that they password should be changed next. I assume I can leave it as a zero.
user_email_hash - A hash of the email... using what to generate it, and what format? Any simple functions either built into php or in Olympus I can use?
user_lastmark - I don't know what this one is. When I setup my test board, the admin was given this as a zero.. but all the bots, and the test user I registed have a timestamp value in for that. What is it? And is it important?
user_last_confirm_key - One of my bots has a value for this column.. every thing else has nothing. What is it, and is it important?
user_colour - Is there a value for this if the user DOES NOT have any special status like Mod, Admin, or Bot? Guessing its blank unless the color has been changed.. otherwise what is the default value? (000000?)
user_options - It shows each row in the dev forum I set up has a value of 893. What does that mean, should everyone have an 893 as default?
user_sig - It says "[BLOB - 0 B]" and I'm guessing everyone's sig is blank. Since I don't have any signatures, I can guess I will be keeping this blank. Same for user_interests.
user_permissions - What the heck does all that stuff mean? Its a bunch of random junk repeated over and over. My bot, anonymous, and me as an admin have data in this field.. the test user I registered does not have anything. (okay to leave blank for default permissions?)
user_password - I assume this is still md5, with no other things? addslashes??
With the exception of those fields it looks like most of my fields can be translated over to Olympus without much trouble.
user_id > user_id
0 > user_type (no one has anything higher)
user_id > group_id (kinda...)
0 > user_permissions
0 > user_perm_from
ip > user_ip
regdate > user_regdate
username > username
username > clean > username_clean
user_password > user_password
0 > user_passchg
email > user_email
???? > user_email_hash
0 > user_birthday
user_lastvisit > user_lastvisit
???? timestamp? or zero > user_lastmark
0 > user_lastpostime
BLANK > user_lastpage
BLANK ? > user_last_confirm_key
0 > user_last_search
0 > user_warnings
0 > user_last_warning
0 > user_login_attempts
0 > user_inactive_reason
0 > user_inactive_time
0 > user_posts
en > user_lang (everyone is english)
0.00 > user_timezone
0 > user_dst
D M d, Y g:i a > user_dateformat
2 > user_style
0 > user_rank
BLANK ? > user_colour
0 > user_unread_privmsg
0 > user_last_privmsg
0 > user_message_rules
-3 > user_full_folder
0 > user_emailtime
0 > user_topic_show_days
t > user_topic_sortby_type
d > user_topic_sortby_dir
0 > user_post_show_days
t > user_post_sortby_type
a > user_post_sortby_dir
0 > user_notify
1 > user_notify_pm
0 > user_notify_type
1 > user_allow_pm
1 > user_allow_viewonline
1 > user_allow_viewemail
newsletter > user_allow_massemail
893 ?? > user_options
BLANK > user_avatar
0 > user_avatar_type
0 > user_avatar_width
0 > user_avatar_height
BLANK > user_sig
BLANK > user_sig_bbcode_uid
BLANK > user_sig_bbcode_bitfield
BLANK > user_from
BLANK > user_icq
BLANK > user_aim
BLANK > user_yim
BLANK > user_msnm
BLANK > user_jabber
BLANK > user_website
BLANK > user_occ
BLANK > user_interests
BLANK > user_actkey
BLANK > user_newpasswd
user_level > DELETE
user_session_time > DELETE
user_active > DELETE
activation_key > DELETE??
email_activation_key > DELETE
new_email > DELETE
pass_actkey > DELETE
new_pass > DELETE
I have a few more questions regaurding the bots and group ID's.. this must be something that has been thought through by the dev team. How do you update from phpBBv2 if there are already several user_id's taken up by the search bots? Can those bots be deleted without trouble? (then re-introduced later as a higher user_id??) I have some problems as my first user is "1".. and my anonymous is "-1". Are there any problems with turning Anonymous to "-1"? Or useing a registered user as "1"?
GROUPS
I will obviously have to create a new row for each user (in phpbb_user_groups). Group ID is autogenerated? (or do I do it as the "REGISTERED" group? And user_id is just the standard Id created by the conversion into the new db.. I am having a hard time figuring out how Groups are coupled to users. More information would be appreciated.
Any help regaurding learning more about those new columns would be appreciated. I am not asking for help on how to convert these items, nor am I asking for someone to provide me code to do it.
How does the new User database work?
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
- jojobarjo32
- Registered User
- Posts: 164
- Joined: Wed Jun 22, 2005 7:38 pm
- Location: France
Re: How does the new User database work?
Ectoman wrote: username_clean - appears to be a clean up of the username field (obviously) would I be okay with just strlowering all the uppercase words? (no usernames contain forgin characters). Otherwise I can use the function built into Olympus to clean the usernames.
A simple strtolower should work if none of the usernames contain exotic characters.
However, I highly recommend you to use the built-in function in phpBB3 to clean usernames.
Ectoman wrote: user_passchg - I am guessing this is the time the password was either LAST changed, or the time that they password should be changed next. I assume I can leave it as a zero.
Let the zero.
Ectoman wrote: user_email_hash - A hash of the email... using what to generate it, and what format? Any simple functions either built into php or in Olympus I can use?
Code: Select all
$email_hash = (int) (crc32(strtolower($email)) . strlen($email));
Ectoman wrote: user_lastmark - I don't know what this one is. When I setup my test board, the admin was given this as a zero.. but all the bots, and the test user I registed have a timestamp value in for that. What is it? And is it important?
Zero should be good...
Ectoman wrote: user_last_confirm_key - One of my bots has a value for this column.. every thing else has nothing. What is it, and is it important?
Blank
Ectoman wrote: user_colour - Is there a value for this if the user DOES NOT have any special status like Mod, Admin, or Bot? Guessing its blank unless the color has been changed.. otherwise what is the default value? (000000?)
Blank too
Ectoman wrote: user_options - It shows each row in the dev forum I set up has a value of 893. What does that mean, should everyone have an 893 as default?
Let the default value (893). Your users will have to re-set their preferences but this is not very important
Ectoman wrote: user_sig - It says "[BLOB - 0 B]" and I'm guessing everyone's sig is blank. Since I don't have any signatures, I can guess I will be keeping this blank. Same for user_interests.
Default value
Ectoman wrote: user_password - I assume this is still md5, with no other things? addslashes??
It is still a simple md5 hash No need to change anything.
Ectoman wrote: user_permissions - What the heck does all that stuff mean? Its a bunch of random junk repeated over and over. My bot, anonymous, and me as an admin have data in this field.. the test user I registered does not have anything. (okay to leave blank for default permissions?)
Sorry but I cannot help you for that one
For the bots, you can delete them temporarily (within the users table AND the bots table), add your users then re-add the bots.
For users ids, let the auto_increment choose a good one (you will need to adjust ids within user group tables...)
I hope that will help you
Re: How does the new User database work?
poyntesm wrote: See -> viewtopic.php?p=164067#p164067
Sorry. I do not feel this is asking for support.
Its asking for documentation.
JoJo,
I appreciate it.
Re: How does the new User database work?
And documentation will be provided at a later date.
However, I'd personally recommend waiting until we make the actual upgrade script available because if you don't undersdtand the schema it will probably be much easier to write something within that framework than try and do it from scratch
However, I'd personally recommend waiting until we make the actual upgrade script available because if you don't undersdtand the schema it will probably be much easier to write something within that framework than try and do it from scratch
Re: How does the new User database work?
Graham, I understand the schema, except for the permissions line. I cannot use a converter as I have a custom database that I need to convert over... the converter I have already written it only about 20 lines.
Re: How does the new User database work?
Done!
All 351 users sucessfully transferred with proper group insertion.. only one casualty (one user with the same user_id as the Yahoo bot). Switched easily enough, and now everyone is on track..
Now for some more permission setup, and more testing.
All 351 users sucessfully transferred with proper group insertion.. only one casualty (one user with the same user_id as the Yahoo bot). Switched easily enough, and now everyone is on track..
Now for some more permission setup, and more testing.
-
- Registered User
- Posts: 3
- Joined: Wed Jun 07, 2006 2:05 pm
Re: How does the new User database work?
I don't suppose anyone knows how to do that in ColdFusion? I have convert the registration from a CF site to phpbb. Had it working in PHPBB 2.x but trying to upgrade now...$email_hash = (int) (crc32(strtolower($email)) . strlen($email));
Re: How does the new User database work?
As much fun as it is to remember the past, topic necromancy isn't really useful or appreciated.improdigal wrote:I don't suppose anyone knows how to do that in ColdFusion? I have convert the registration from a CF site to phpbb. Had it working in PHPBB 2.x but trying to upgrade now...$email_hash = (int) (crc32(strtolower($email)) . strlen($email));
Try asking in the MOD Writers Forum on phpBB.com
Locked