{"action":"created","issue":{"url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/6552","repository_url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads","labels_url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/6552/labels{/name}","comments_url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/6552/comments","events_url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/6552/events","html_url":"https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6552","id":321383273,"number":6552,"title":"Remove PII and switch file download logs to use customer ID #6548","user":{"login":"cklosowski","id":1390124,"avatar_url":"https://avatars0.githubusercontent.com/u/1390124?v=4","gravatar_id":"","url":"https://api.github.com/users/cklosowski","html_url":"https://github.com/cklosowski","followers_url":"https://api.github.com/users/cklosowski/followers","following_url":"https://api.github.com/users/cklosowski/following{/other_user}","gists_url":"https://api.github.com/users/cklosowski/gists{/gist_id}","starred_url":"https://api.github.com/users/cklosowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cklosowski/subscriptions","organizations_url":"https://api.github.com/users/cklosowski/orgs","repos_url":"https://api.github.com/users/cklosowski/repos","events_url":"https://api.github.com/users/cklosowski/events{/privacy}","received_events_url":"https://api.github.com/users/cklosowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-08T23:44:09Z","updated_at":"2018-05-14T16:12:55Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/pulls/6552","html_url":"https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6552","diff_url":"https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6552.diff","patch_url":"https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6552.patch"},"body":"Fixes #6548\r\n\r\nProposed Changes:\r\n1. Adds a migration routine to kill the `_edd_log_user_info` for the file download logs and add `_edd_log_customer_id` for the file download logs\r\n2. Adds `edd_count_file_downloads_of_customer` to return the file download count of a customer record.\r\n3. Updates `edd_count_file_downloads_of_user` to switch to the `edd_count_file_downloads_of_customer` function if the string is an email (this is what it was doing previously anyway, now it's explicit)\r\n4. Updates the list table to use the proper customer ID instead of always performing searches on users (users mean nothing to EDD for the most part, customer should be our canonical).\r\n5. Updates the file download log list table to search customers, not users (as a canonical source)\r\n6. Updates the Customers API endpoint to send the customer ID, directly.\r\n\r\nOverall, this is far more accurate to count a customer's download count. The previous method was doing a `LIKE` search on the user info, but if a customer changed their primary email address, the logs would not be updated, so the search would be in accurate. By converting all searches for customer download counts to use the `$customer->id` the email address is irrelevant.\r\n\r\nBy removing the log user info for this type of log, we're removing PII which makes us easier to comply with GDPR."},"comment":{"url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/comments/388874115","html_url":"https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6552#issuecomment-388874115","issue_url":"https://api.github.com/repos/easydigitaldownloads/easy-digital-downloads/issues/6552","id":388874115,"user":{"login":"cklosowski","id":1390124,"avatar_url":"https://avatars0.githubusercontent.com/u/1390124?v=4","gravatar_id":"","url":"https://api.github.com/users/cklosowski","html_url":"https://github.com/cklosowski","followers_url":"https://api.github.com/users/cklosowski/followers","following_url":"https://api.github.com/users/cklosowski/following{/other_user}","gists_url":"https://api.github.com/users/cklosowski/gists{/gist_id}","starred_url":"https://api.github.com/users/cklosowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cklosowski/subscriptions","organizations_url":"https://api.github.com/users/cklosowski/orgs","repos_url":"https://api.github.com/users/cklosowski/repos","events_url":"https://api.github.com/users/cklosowski/events{/privacy}","received_events_url":"https://api.github.com/users/cklosowski/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T16:12:55Z","updated_at":"2018-05-14T16:12:55Z","author_association":"OWNER","body":"@SDavisMedia Ok, I've got a tool for `master` to generate a bunch of download logs in the existing format. If you don't mind could you test out this PR to make sure you're able to generate a ton of download logs? https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6558"}}
{"actor":{"display_login":"cklosowski"}}