mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
Update wpmu_delete_user() to use wp_delete_user()'s Link Deletion API, ensures that all actions and cleanups are run. See #12298
git-svn-id: http://svn.automattic.com/wordpress/trunk@13241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
80d9329e5e
commit
a6637d9c7a
@ -142,7 +142,12 @@ function wpmu_delete_user($id) {
|
||||
}
|
||||
|
||||
// Clean links
|
||||
$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->links WHERE link_owner = %d", $id) );
|
||||
$link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) );
|
||||
|
||||
if ( $link_ids ) {
|
||||
foreach ( $link_ids as $link_id )
|
||||
wp_delete_link($link_id);
|
||||
}
|
||||
|
||||
restore_current_blog();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user