Custom Fields
Re-Envisioned
Support MB User Profile MetaBox AIO – rwmb_profile_update_user_data – $data empty

  • Creator
    Topic
  • #18446
    TobiasThiele
    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;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #18519
    TobiasThiele
    Participant

    push?

    #18525
    Anh 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 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash