Support » Plugin: CMB2 » User fields showing previous registrant's info

  • Resolved jmaurer

    (@360zen)


    Hi Michael (or anyone else willing to help),
    I just ran into an interesting issue with user meta fields. I’ve added fields to users, such as phone numbers, “preferred” email address, etc. (nothing fancy) and they are working great. However, I just realized that when I go to register a new user, the phone number, email, etc. is all already filled with the information from the most recently registered user’s info.

    I tried this in an incognito window to see if it was a caching issue, and had the same results. Any ideas here? This could get pretty confusing for people to have to delete someone else’s info when registering a new profile…

    Thanks in advance for any help on this!

    -Justin

    https://wordpress.org/plugins/cmb2/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    If the field types you’re using have default value options available, probably worth setting them. Otherwise, you’ll want to see about some way to make the meta keys/IDs unique per user. Somehow adding the user ID to it, if possible.

    Thread Starter jmaurer

    (@360zen)

    Hi Michael,
    It’s been a while since I looked at this issue, obviously, but it is still bugging me, and now I have time to fix it.

    The fields in question are a phone number (text) field and a profile image (file upload) field. Every time I go use this page, the very first phone number/file path I ever entered into the field is automatically populated. I’m assuming I shouldn’t need to set an empty string as the default here.

    I THINK I’m having the same issue (where it’s bringing up an old value rather than the actual default) with a couple of select fields as well, but it’s hard to tell if it’s the same problem.

    Is there any way to clear these values from the memory of these fields? Why could this be happening?

    Thanks in advance for any help on this!

    Thread Starter jmaurer

    (@360zen)

    UPDATE: Here are a few facts/clues that I’ve gathered. Do with them what you will.

    1) The issue started on my local dev environment. After migration to the production server, the issue is still present. For example the file upload field on the production server still shows the original file path “//localhost:3000/wp-content/uploads/2015/04/450×350.gif” from when I tried to do this while running browser-sync.
    2) These values are NOT in the database. A search of the entire database for “localhost:3000” returns no results. A search for the phone number and email only show matches in the origin user I created with these values (for myself).
    3) I don’t have any caching plugins installed.

    Also, it seems that I’m not the only one reporting this problem.
    https://github.com/WebDevStudios/CMB2/issues/201

    Thread Starter jmaurer

    (@360zen)

    Okay, you know what. Updating the CMB2 code to the newest version seems to have solved my issue. I’m going to RE-mark this as “resolved”. If anyone else has this problem, update CMB2.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Sounds like solutions have been found, in that the latest version fixes things. Good to hear đŸ˜€

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User fields showing previous registrant's info’ is closed to new replies.