[wp-trac] [WordPress Trac] #43880: Add functionality to add an anonymous user an get its ID for anonymization of data related to a WordPress user.

WordPress Trac noreply at wordpress.org
Fri Apr 27 14:44:23 UTC 2018


#43880: Add functionality to add an anonymous user an get its ID for anonymization
of data related to a WordPress user.
-------------------------------------------------+-------------------------
 Reporter:  TZ Media                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  gdpr has-patch needs-testing needs-  |     Focuses:
  unit-tests 2nd-opinion                         |
-------------------------------------------------+-------------------------
Changes (by TZ Media):

 * keywords:  needs-patch gdpr => gdpr has-patch needs-testing needs-unit-
     tests 2nd-opinion


Comment:

 * Adds a helper function `_wp_privacy_get_anonymous_user_id()` that
 generates an anonymous user if none exists and return its ID.
   * Returns 0 if no user could be created.
 * Adds a type of `user_id` to the existing `wp_privacy_anonymize_data()`
 helper function to allow easy anonymization of a user ID.

 Questions: How can we prevent logins and wp_admin access by that user by
 all means? I've set the password to `null` and the role to the non-
 existing role `anonymous_user`, but I hope there's a more elegant way to
 achieve this.

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


More information about the wp-trac mailing list