add_existing_user_to_blog()添加用户到当前博客(多站点)

目录

描述

Add a user to the current blog based on details from maybe_add_existing_user_to_blog().

Note: This function is called by maybe_add_existing_user_to_blog() and should not be called directly. This page is for informational purposes only. Use add_user_to_blog().

add_existing_user_to_blog() 描述

用法

<?php add_existing_user_to_blog$details ?>

add_existing_user_to_blog() 用法

参数

$details

(array) (可选) Must at least contain values for the keys listed below

默认值: false (which will cause a failure)

  • $details['user_id'] - (integer) the ID of the user being added to the current blog
  • $details['role'] - (string) the role to be assigned to the user in the current blog

add_existing_user_to_blog() 参数

注意

add_existing_user_to_blog() 注意

历史

添加于 版本: MU ( 3.0.0)

add_existing_user_to_blog() 历史

源文件

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

add_existing_user_to_blog() 源文件

相关