mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Use update and insert. Props DD32. fixes #6836
git-svn-id: https://develop.svn.wordpress.org/trunk@12652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -435,8 +435,8 @@ function wp_delete_user($id, $reassign = 'novalue') {
|
||||
|
||||
} else {
|
||||
$reassign = (int) $reassign;
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $id) );
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $id) );
|
||||
$wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) );
|
||||
$wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) );
|
||||
}
|
||||
|
||||
// FINALLY, delete user
|
||||
|
||||
Reference in New Issue
Block a user