• Hello everybody,

    I use CF7 for my site to record people’s data for Contact Tracing in reference to the Covid-19 pandemic.

    Our country obliges us to do this.

    At the moment I can see the IP of those who provide me with the data but to protect myself, after speaking with a lawyer and the Police, I should have the MAC Address of the device because the IP is dynamic and changes only by turning the phone off and on again.

    Can someone help me?

Viewing 1 replies (of 1 total)
  • Hello @pascalpavan,

    This is not so easy to achieve, it’s depends on the device, the operating system, the user’s network, etc. But if you still want to try, you can use a special custom mail tag, like this:

    /**
    * Custom Special Mail Tag: [_user_mac_addr]
    */
    
    add_filter( 'wpcf7_special_mail_tags', 'wpcf7_mac_addr_special_mail_tag', 20, 3 );
    function wpcf7_mac_addr_special_mail_tag( $output, $name, $html )
    {
      $name = preg_replace( '/^wpcf7\./', '_', $name );
      if ( '_user_mac_addr' == $name ) {
        
        // get user Mac Address
        // (You code goes here)
        $mac = '00-00-00-00-00-00';
        
        $output = 'User Mac Address: ' . $mac;
      }
      return $output;
    }

    Now you need to put the custom special mail tag [_user_mac_addr] in your Message body section within Mail tab.

    Best regards,
    Yordan.

Viewing 1 replies (of 1 total)
  • The topic ‘CF7 – I register the IP but is it possible to register the MAC Address?’ is closed to new replies.