Skip to:
Content
Pages
Categories
Search
Top
Bottom

solved: disable saving of ip address

  • @vc1541

    Participant

    Hello

    In Germany a court has decided that it is not allowed to save ip addresses permanently.

    I could change the function bbp_current_author_ip() in a way that it always returns 0.0.0.0 but as this is in the /wp-content folder it would be overwritten the next time bbp is updated.

    So which way should I take to set IP to 0.0.0.0 without modifying and including all the functions that use bbp_current_author_ip() in my theme’s functions.php?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @vc1541

    Participant

    Solved it with the following code in my theme’s function.php:

    add_filter(‘bbp_current_author_ip’, ‘my_anonymize_ip’);

    function my_anonymize_ip($retval) {
    $retval = ‘0.0.0.0’;
    return $retval;
    }

    I found out that the filter “bbp_current_author_ip” is called by bbp when creating a new topic/reply.

    @tinfoiler

    Participant

    Im in need of this code as well, however when i add it to functions in my wordpress theme folder it crashes my website. I tried adding to bbpress functions as well but same problem. Any advice? :/

    @stagger-lee

    Participant

    Old topic but if it can help someone. Code is tested and still works, just formatting of code on this forum is wrong.

    add_filter('bbp_current_author_ip', 'my_anonymize_ip');
    
    function my_anonymize_ip($retval) {
    $retval = '0.0.0.0';
    return $retval;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar