1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Edit user join date

Discussion in 'XenForo Questions and Support' started by Tim, Oct 9, 2010.

  1. Tim

    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?
     
  2. Lawrence

    Lawrence Well-Known Member

    Currently you will need go through phpAdmin to change the user's join date: user -> register_date
     
  3. Tim

    Tim Active Member

    Thanks Lawrence. Will this be available in the admincp in later releases?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Out of interest, why do you want to edit the join date?
     
  5. Tim

    Tim Active Member

    I have an issue with my join date being the date that I set-up my xF test forum, it didn't import the real date from the vB 4 database (and I know the importer is for vB 3). I guess I'm used to vB and how much of a users profile you could edit.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Here is a query you can use on your database:

    Code:
    UPDATE xf_user
    SET register_date = UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')
    WHERE user_id = 1
    
    Just change the date and userid appropriately.
     
    Big Dan, Heavy, dwdmadmac and 2 others like this.
  7. Tim

    Tim Active Member

    Thanks Jake but I don't know how to do a db query.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Do you have access to phpMyAdmin?

    Just edit the code Jake provided and paste it into the window in the SQL tab and then click Go.

    sql.PNG
     
    Renada and Tim like this.
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You have a CPanel server which has phpmyadmin preinstalled. Login to your CPanel (the hosting control panel provided by your host). Click the phpmyadmin link. On the phpmyadmin page select your database on the left. Then click the SQL tab on the top. Paste the query into there and run it.
     
    Tim likes this.
  10. Shanj

    Shanj Well-Known Member

    OK it's good there is a workaround. But for those of us who only ever use PHPMyAdmin to set up the database, it's a daunting job to tackle it for anything else. Plus what if we mess something up o the database? Plus why do we have to go outside XF in order to manage tasks in XF?

    I quite often need to edit the join date because some members don't move through induction on my project fast enough - they're not just doing the forum but a whole lot else, or I'm too busy to set up their forum account on the day they join us. But we rely on that record to calculate fees and various other implications of the membership.

    Clearly a call for a mod.

    I'm quite taken aback that this isn't on the admin side of a user profile. Oh dear.
     
  11. Tim

    Tim Active Member

    Thanks for schooling me on how to do this query.
     
  12. Tim

    Tim Active Member

    Worked, thanks gents.
     
  13. Shanj

    Shanj Well-Known Member

  14. snoopy5

    snoopy5 Well-Known Member

    Hi

    I would like to change the registration /joined date of many user in one step. All those users have a registration date of 01.01.1970. This is because of a very old import from another forum software into vbulletin. Now I import from vb into xf and would like to change all those wrong dates into something more logical like 14.1.2003.

    How can I do this in phpmyadmin?
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That would be a timestamp of 0. This query should work:

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

    snoopy5 Well-Known Member


    Thanks, I will try that later on as soon as all imports are finished. I just started the real import of the first of several vb imports. Will take around 6-8 hours I guess. Kind of exciting :)
     
  17. snoopy5

    snoopy5 Well-Known Member

    Hi

    this worked perfectly (y)
     
  18. Morgain

    Morgain Well-Known Member

    waindigo did a little addon for me that made the Join date an editable field on the front of the user account in admin.
    If anyone wants it ask waindigo about it.
     
  19. snoopy5

    snoopy5 Well-Known Member


    I would be interested this!
     
  20. snoopy5

    snoopy5 Well-Known Member

    Hi

    this is strange. I used the code

    Code:
    UPDATE xf_user
    SET register_date = UNIX_TIMESTAMP('yyyy-mm-dd 2003:01:14')
    WHERE register_date = 0
    after I imported 2 vb forums successfully. The joined date was then correct in the userprofiles.

    Now I imported more vb forums and the joined dates of the same users have been again on 1970. But when I now try to use the same code in SQL, it does not work anymore- It sais 0 users are affected of the search.

    What did I do wrong?
     

Share This Page