WordPress函数文档add_existing_user_to_blog()

添加用户到当前博客(多站点) 描述 Add a user to the current blog based …

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

描述

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().

用法

<?php add_existing_user_to_blog$details ?>

参数

$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

注意

  • 使用到 global $blog_id.
  • 使用到 add_user_to_blog().
  • 调用 动作 ‘added_existing_user’ with the user’s ID and the result returned by add_user_to_blog()

历史

添加于 版本: MU ( 3.0.0)

源文件

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

相关

maybe_add_existing_user_to_blog(), add_user_to_blog(), remove_user_from_blog(), add_new_user_to_blog()

  • 原文:http://codex.wordpress.org/Function_Reference/add_existing_user_to_blog
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT