[wp-trac] [WordPress Trac] #43547: Add personal data from usermeta/userdata to personal data export
WordPress Trac
noreply at wordpress.org
Tue Apr 24 17:22:13 UTC 2018
#43547: Add personal data from usermeta/userdata to personal data export
-------------------------------------------------+-------------------------
Reporter: allendav | Owner: tz-media
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.9.6
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: gdpr has-patch 2nd-opinion needs- | Focuses:
testing needs-unit-tests |
-------------------------------------------------+-------------------------
Changes (by desrosj):
* keywords: gdpr has-patch 2nd-opinion needs-refresh => gdpr has-patch
2nd-opinion needs-testing needs-unit-tests
Comment:
I refreshed the patch to apply correctly. While I was at it, I also
included the following updates:
- Added missing space at the beginning and/or end of the `add_filter()`
call and control structures.
- Added `@since` tags to inline documentation for added functions.
- Aligned the `$data_to_export` array at the `=>`.
- Associative arrays should have each item on its own line when there are
more than one.
- Add missing `=` sign in the `elseif ($user->data->user_status = '1' )`
condition. Also, converted the `user_status` conditionals to be Yoda
conditions to follow the coding standards. (Should these use strict
comparisons as well?)
Questions:
- Email is passed through `strtolower()`. I ''think'' might cause issues
with mixed case emails.
- `wp_user_personal_data_exporter()` has a second parameter, `$page`. For
the comments export (the original source of this code), this seems to
represent the page of results. If this is needed for the user data export,
there should be a description added to that paremter's `@param` tag. Side
note: I think the description for the comment `$page` parameter could be
confusing. `Comment page.` could be interpreted as a few different things:
the page post that the comments belong to, page of the data results, etc..
- I removed the password related items. I don't think that needs to be
included. It is something that is a secret to you. But I could be wrong.
- The `$done` variable at the end of `wp_user_personal_data_exporter()` is
not tied into any logic. If `$page` needs to be utilized, then this needs
to be tied into that like in comments.
- The comments export checks that the email address is not empty and
returns early if it is. Should this do the same for consistency? An early
return could also be added if the `get_user_by()` result is empty.
I would also like to see some tests for this. I can come back and write
some if I am not beaten to it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43547#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list