remove_user_from_blog()删除站点用户(多站点)

目录

描述

Removes a user from a blog.

Accepts an optional $reassign parameter, if you want to reassign the user's blog posts to another user upon removal.

remove_user_from_blog() 描述

用法

<?php remove_user_from_blog$user_id$blog_id$reassign ); ?>

remove_user_from_blog() 用法

参数

$user_id

(integer) (必填) ID of user to remove

默认值: None

$blog_id

(integer) (必填) ID of blog to remove user from

默认值: None

$reassign

(string) (可选) a user to whom to reassign the removed user's posts

默认值: empty string

remove_user_from_blog() 参数

示例

Remove user 243 from blog 3 and reassign their posts to user 2.

remove_user_from_blog() 示例

注意

Use the 'remove_user_from_blog' 动作 to fire an event when users are removed from a blog.

remove_user_from_blog() 注意

历史

添加于 版本: MU

remove_user_from_blog() 历史

源文件

remove_user_from_blog() 函数的代码位于 wp-includes/ms-functions.php

remove_user_from_blog() 源文件

相关