maybe_add_existing_user_to_blog()允许用户访问个人中心

目录

描述

Add a new user to a blog by visiting /newbloguser/username/.

This will only work when the user's details are saved as an option keyed as 'new_user_x', where 'x' is the username of the user to be added, as when a user is invited through the regular WP Add User interface.

The details must at least contain values for the following keys:

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

maybe_add_existing_user_to_blog() 描述

用法

<?php maybe_add_existing_user_to_blog(); ?>

maybe_add_existing_user_to_blog() 用法

参数

This function does not accept parameters, pertinent information is passed by saving it in the options as described in Description. This information is then removed from options once the data has been extracted.

maybe_add_existing_user_to_blog() 参数

示例

maybe_add_existing_user_to_blog() 示例

历史

添加于 版本: MU

maybe_add_existing_user_to_blog() 历史

源文件

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

maybe_add_existing_user_to_blog() 源文件

相关