• Resolved oliver_rub

    (@oliver_rub)


    Hello,
    i want to mask the last two blocks of the IP address (due to German privacy and data protection regulations) aaaaand I dont want to fork your plugin. So if you add it to the plugin, I dont need to apply my modification after each edit. 😉

    So, would you mind adding a filter to your core.php so that I can hook to add to change the IP before its getting stored? That would be nice

    core.php L83:
    update_user_meta( $user_id, '_bprwg_ip_address', $_SERVER['REMOTE_ADDR'] );

    Could be changed into this:

    $ip = $_SERVER['REMOTE_ADDR'];
    $ip = apply_filters('_bprwg_ip_address', $ip);
    update_user_meta( $user_id, '_bprwg_ip_address', $ip );

    This doesnt change normal behavior according to my test and allows me to mask the IP if need be.
    Thank you in advance 🙂

    https://ww.wp.xz.cn/plugins/bp-registration-options/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Request for filter in core.php | code suggestion included’ is closed to new replies.