mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
665df851ad
commit
525b9145f8
@ -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 ) );
|
||||
|
Loading…
Reference in New Issue
Block a user