[wp-trac] [WordPress Trac] #44676: Support comma-seperated list for Privacy Requests

WordPress Trac noreply at wordpress.org
Mon Mar 4 19:19:21 UTC 2019


#44676: Support comma-seperated list for Privacy Requests
-------------------------------------------------+-------------------------
 Reporter:  garrett-eclipse                      |       Owner:  garrett-
                                                 |  eclipse
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.2
Component:  Privacy                              |     Version:  4.9.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots needs-testing ux-    |     Focuses:  privacy
  feedback ui-feedback needs-refresh             |
-------------------------------------------------+-------------------------
Changes (by xkon):

 * keywords:  has-screenshots has-patch needs-testing ux-feedback ui-
     feedback => has-screenshots needs-testing ux-feedback ui-feedback
     needs-refresh


Comment:

 Thanks for this @garrett-eclipse this would be a handy addition in my
 opinion and a really good start for it also!

 Some notes after checking the patch:

 1] There are minor CS issues i.e. tabs not spaces for alignments etc.

 2] When the emails are added we have to consider the "space" character as
 well for example:
 one at test.test, two at test.test, three at test.test - Wouldn't work as a space
 would break the mail check.

 To address this we could alter `$usernames_or_email_addresses = explode(
 ',', $username_or_email_for_privacy_request );` into
 `$usernames_or_email_addresses = explode( ',', str_replace( ' ', '',
 $username_or_email_for_privacy_request ) );` to take care of those space
 characters as well.

 3] The `foreach` loop you're adding ends with a `break;` ( line 742 ) most
 likely forgotten while testing/creating the patch :D .

 4] Let's change the wording of "comma-delimited" to "comma-separated" as I
 think it's most commonly used.

 ---

 As an extra note a user might re-paste the same comma-separated list
 multiple times with the idea that it would simply add the "extra" e-mails
 that are not yet in the list. The way the code works now it will exit as
 soon as it finds an existing mail. To replicate this easily:

 Add an export for "one at test.test" and then try by doing "one at test.test,
 two at test.test, three at test.test", none will be added. The optimal would be
 for two at test.test / three at test.test to get in that list as well :) .

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44676#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list