Announcement

Collapse
No announcement yet.

no row in userfield table for new users?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • John h
    replied
    Thanks for that. I found and fixed 36 users (out of 8000 odd). I haven't installed any mods for a few months so I wouldn't know which one it was. The random nature of the problem makes it hard to work out

    Leave a comment:


  • Lats
    replied
    Yes, try this...
    Code:
    INSERT IGNORE INTO
        userfield (userid)
        (SELECT
            user.userid
         FROM
            user 
         LEFT JOIN
            userfield
         ON
            user.userid = userfield.userid 
         WHERE
            userfield.userid IS NULL)
    You should consider removing the mod that's been breaking it though

    Leave a comment:


  • John h
    replied
    I'm guessing I need to have a query that finds all rows in the user table that don't have a corresponding row in the userfield table, then insert a row in the userfield table?

    Leave a comment:


  • Lats
    replied
    Scrub that - that won't work.

    I'll be back

    Leave a comment:


  • Lats
    replied
    I guess you have a mod installed that has caused this problem. In the meantime, if you want to populate all empty fields, try this query...
    Code:
    UPDATE
       userfield
    SET
       field1 = 'blank',
       field2 = 'blank',
       field3 = 'blank',
       field4 = 'blank'
    WHERE
       field1 = ''

    Leave a comment:


  • John h
    replied
    I have 4 userfields in the table field1, field2, field3, field4

    For the users that it has happened to, the link on their name in the AdminCp is missing their userid i.e. forum/admincp/user.php?do=edit&u=

    So if I click on their username, it never finds them as the url doesn't have their userid.

    After searching around I discovered that the users didn't have a row in the userfield table. When I manually entered a row for them, it fixed the problem.

    As to why this would randomly happen - I have no idea.

    Leave a comment:


  • Lats
    replied
    You have an additional userfield in the database, something like field6 for example?

    There shouldn't be a problem editing a user that has an empty field - what error are you getting?

    It's easy enough to put something in an empty field, but you would be better off finding out what the problem is that is causing the error.

    Leave a comment:


  • John h
    started a topic no row in userfield table for new users?

    no row in userfield table for new users?

    There are random users on my 3.6.12 forum that don't get a row created in the userfield table when they register. No pattern to it, most work fine but the occasional one doesn't.

    When this happens I can't edit the user in the AdminCP I have to go into MyPHP and manually insert a row for their userid.

    Any ideas on why this is happening?

    Is there a query I can run in MySQL that can insert a row for any users that don't have one in userfield?

Related Topics

Collapse

Working...
X