WordPress.org

Make WordPress Core

Changeset 13241


Ignore:
Timestamp:
02/20/10 01:45:04 (4 years ago)
Author:
dd32
Message:

Update wpmu_delete_user() to use wp_delete_user()'s Link Deletion API, ensures that all actions and cleanups are run. See #12298

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r13209 r13241  
    143143 
    144144            // Clean links 
    145             $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->links WHERE link_owner = %d", $id) ); 
     145            $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); 
     146 
     147            if ( $link_ids ) { 
     148                foreach ( $link_ids as $link_id ) 
     149                    wp_delete_link($link_id); 
     150            } 
    146151 
    147152            restore_current_blog(); 
Note: See TracChangeset for help on using the changeset viewer.