[wp-trac] [WordPress Trac] #41955: bug with wp_delete_user() and clean_user_cache()

WordPress Trac noreply at wordpress.org
Fri Sep 22 12:59:25 UTC 2017


#41955: bug with wp_delete_user() and clean_user_cache()
--------------------------+------------------------------
 Reporter:  Cyrille37     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+------------------------------

Comment (by Cyrille37):

 Here is the code excerpt :

 {{{#!php
 <?php

 function clean_user_cache( $user ) {
         if ( is_numeric( $user ) )
                 $user = new WP_User( $user );

         if ( ! $user->exists() )
                 return;

         wp_cache_delete( $user->ID, 'users' );
         ...
 }}}

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


More information about the wp-trac mailing list