Use correct column name. See [27152].

props barry.
fixes #25545.

Built from https://develop.svn.wordpress.org/trunk@27834


git-svn-id: http://core.svn.wordpress.org/trunk@27668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-29 03:39:14 +00:00
parent 665df851ad
commit 525b9145f8

View File

@ -276,7 +276,7 @@ function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
if ( $reassign != '' ) {
$reassign = (int) $reassign;
$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $user_id ) );
$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->links WHERE link_owner = %d", $user_id ) );
$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $user_id ) );
if ( ! empty( $post_ids ) ) {
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $user_id ) );