• Resolved ignition3d

    (@ignition3d)


    Hi, I have created some custom fields for users (students). for example : class, year of birth, badge_number, etc…

    When I import my CSV with upgraded classes, the usermeta fields is not updated.

    thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Javier Carazo

    (@carazo)

    Are you sure it is metadata from the usermeta table?

    Thread Starter ignition3d

    (@ignition3d)

    yes. this is a screen of my db.

    Thread Starter ignition3d

    (@ignition3d)

    function sbc_save_custom_fields($user_id) {
        if (!current_user_can('edit_user', $user_id)) {
            return false;
        }
        update_user_meta($user_id, 'badge_number', $_POST['badge_number']);
        update_user_meta($user_id, 'user_class', $_POST['user_class']);
        update_user_meta($user_id, 'user_address', $_POST['user_address']);
        update_user_meta($user_id, 'user_address2', $_POST['user_address2']);
        update_user_meta($user_id, 'user_postcode', $_POST['user_postcode']);
        update_user_meta($user_id, 'user_city', $_POST['user_city']);
        update_user_meta($user_id, 'user_phone', $_POST['user_phone']);
        update_user_meta($user_id, 'user_birth_year', $_POST['user_birth_year']);
        update_user_meta($user_id, 'user_gender', $_POST['user_gender']);
    }

    I use this code to create custom fields.

    Anyway, thank you so much for your support and for your plugin.

    • This reply was modified 10 months, 4 weeks ago by ignition3d.
    Plugin Author Javier Carazo

    (@carazo)

    So if you use user_address for example as column it should work.

    if you have any problems try deactivating everything except this plugin and see how it works.

    It’s something really basic and I don’t see where it can be a problem.

    Thread Starter ignition3d

    (@ignition3d)

    yes… I also find it very strange. the file I’m importing is the correct one with the new data. there is no cache problem. it’s very strange.

    is not updating any data

    • This reply was modified 10 months, 4 weeks ago by ignition3d.
    Plugin Author Javier Carazo

    (@carazo)

    Really strange. Try with only one row.

    Anyway… from here I cannot do much more sorry.

    Thread Starter ignition3d

    (@ignition3d)

    very strange. I changed the path of the file to import. now it updates the data correctly.

    Plugin Author Javier Carazo

    (@carazo)

    Really strange :s

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom usermeta fields are not updated’ is closed to new replies.