MetaBox AIO - rwmb_profile_update_user_data - $data empty

Support MB User Profile MetaBox AIO - rwmb_profile_update_user_data - $data emptyResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18446
    TobiasThieleTobiasThiele
    Participant

    Hey,

    I've created custom fields to safe bank information. Now I want to modify the submitted data to encrypt the date to store it in the database.
    But I can't modify the submitted data because the $data array is empty.

    ( The data the user submits is still saved to the database - but unmodified )

    Using the following code to get the $data:

    add_filter( 'rwmb_profile_update_user_data', 'modify_users_bank_data', 10, 2);
    
    function modify_users_bank_data($data, $config) {
        print_r('<pre>');
        print_r($data);
        exit;
        return $data;
    }
    #18519
    TobiasThieleTobiasThiele
    Participant

    push?

    #18525
    Anh TranAnh Tran
    Keymaster

    Hi Tobias,

    Sorry for the delay. The filter works for only default user fields, like user email and password. To change the value of custom fields before saving into the DB, please use the rwmb_field_id_value filter.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.