phpBB2Drupal is working great for me so far, so maybe I'm missing how to set this... but when using it to import users, it doesn't retain their join dates -- it sets the date as today. Senority is pretty important to my community so this is a must-have for me :) Please let me know how I can do this.

CommentFileSizeAuthor
#18 phpbb2drupal_created.diff760 byteswebchick

Comments

beginner’s picture

Somebody complained about that already.

phpbb2drupal uses the Drupal User API to import the users. I'm going to have a look if it's possible to import the registration date, too.

stephthegeek’s picture

Ah, I missed that. FWIW, 'user_regdate' in 'nuke_bbusers' (my phpBB db) looks like it matches up with 'created' in Drupal's 'users'.

beginner’s picture

yes.

there is a line in the module that maps the one to the other:

'created' => $user->user_regdate

But for some reasons, the date is still not being imported.

I am right now coding another new feature for phpbb2drupal (get rid of bbcode altogether). If you want to provide a patch for the user reg date issue, i'll be able to commit it later today. If not, I'll check this issue further when I'm done with bbcode.

beginner’s picture

I found the problem: Drupal was overriding the registration date with now() when importing the new user.
I have to go to work, now. I'll update cvs with a fix in a 4/5 hours.

beginner’s picture

Category: feature » bug
Status: Active » Fixed

fixed in cvs.
Thanks for reporting.

stephthegeek’s picture

Thank you very much!

beginner’s picture

You're welcome.

By the way:

Webcam & site
 Self-explanatory, n'est pas?

should read:

By the way:

Webcam & site
 Self-explanatory, n'est-ce pas?

;-)

nice site.

stephthegeek’s picture

Thanks beginner :)

Small problem... for some reason a large number of my join dates in phpbb are in a regular short date format (ie. "Mar 22, 2005"). I know it's a long shot, but I just realized this as I'm about to go live and I was wondering if someone would be so kind as to provide a quick query to manually update my join dates from phpbb to drupal to account for both types of date formats.

stephthegeek’s picture

nm, figured it out... updated source data to unix timestamp first with
UPDATE 'nuke_bbusers' SET user_regdate = UNIX_TIMESTAMP(STR_TO_DATE(user_regdate, '%b %e, %Y')) WHERE user_regdate LIKE '%,%'

beginner’s picture

Thanks for posting the fix: that may help someone else.

Anonymous’s picture

Status: Fixed » Closed (fixed)
hakeem’s picture

Version: » master
Assigned: Unassigned » hakeem
Status: Closed (fixed) » Active

Waw! I used the latest update on a linux webserver but all the regdates are 36 years 28 weeks! My website is less than two years old!

beginner’s picture

Category: bug » support

this worked for me and for others.
Can you have a look at your phpBB DB, in the phpbb_users table: what kind of values do you have in the field user_regdate?
Can you give me the value for 2-3 users?

beginner’s picture

also give me the list of all phpBB MODs you have installed on your system.

hakeem’s picture

The date format is like 'Sep 28, 2004', 'Oct 05, 2004'... I think I should convert these values to Linux timestamp format. Right?

My website is a community for medical students in Damascus University. Why you asked about phpBB mods? I think there is none.

beginner’s picture

The date format is like 'Sep 28, 2004', 'Oct 05, 2004'... I think I should convert these values to Linux timestamp format. Right?

Yes.

rkn-dupe’s picture

Just to let you know regdates are fine for me.

webchick’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new760 bytes

Wrapping $user->user_regdate in a strtotime() solved this issue for me (my regdates were like "Aug 01, 2004" as well). Not sure how it affects dates which are already timestamped, though.

beginner’s picture

Assigned: hakeem » beginner
Status: Needs review » Fixed

Thanks webchick for pointing out the function strtotime().
The function does espect a date in the English US format, so I added a setting for such users.

Anonymous’s picture

Status: Fixed » Closed (fixed)