Edit user join date

Tim

Active member
Any way to edit a users join date? If not, will a users profile have more information that can be edited from the admincp?
 
What do I need to write/ change in this code so that it takes all users who have a join date of 1.1.1970 adn replace it with i.e. 14.1.2008? The zero does not work.

Look in the xf_user table and find the value for register_date that represents that 1970 date. I would think it would be 0, but it could be something else close to that.
 
Look in the xf_user table and find the value for register_date that represents that 1970 date. I would think it would be 0, but it could be something else close to that.
Hi

that is strange. I checked in the table and the regstration date of the users is still "0" in the XF-usertable. But why then it does not accept the code anymore?

Code:
UPDATE xf_user
SET register_date = UNIX_TIMESTAMP('yyyy-mm-dd 2003:01:14')
WHERE register_date = 0
 
I assume you are replacing the value of the new date:

Code:
UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')

Here is an example:

Code:
UNIX_TIMESTAMP('2001-02-28 09:20:50')

That is Feb 28, 2001 at 9:20am and 50 seconds.
 
I assume you are replacing the value of the new date:

Code:
UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')

Here is an example:

Code:
UNIX_TIMESTAMP('2001-02-28 09:20:50')

That is Feb 28, 2001 at 9:20am and 50 seconds.


O.k., pleaee correct me if I am wrong. Just want to make sure that I do not crash the db..

In the userfield is just the zero. In the profile under the Avatar of the same users is 1/1/70 which means in unix time stamp 1970-01-01

So even in the table is the zero, I would use the code

Code:
UPDATE xf_user
SET register_date = UNIX_TIMESTAMP('yyyy-mm-dd 2003-01-14')
WHERE register_date = UNIX_TIMESTAMP('1970-01-01 00:00:00')

Is this correct?
 
No. Use the code I posted originally:

Code:
UPDATE xf_user
SET register_date = UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')
WHERE register_date = 0

Just fill in the new date on the middle line.
 
(y)

This worked again! Thanks !!!

I guess I need more sleep. The last seven days was really stressing with not much slep because of all the imports...

Thanks again!
 
Top Bottom