Function: maybe_add_existing_user_to_blog

maybe_add_existing_user_to_blog( )

Add a new user to a blog by visiting /newbloguser/{key}/.

This will only work when the user's details are saved as an option keyed as 'new_user_key', where 'key' is a hash generated for the user to be added, as when a user is invited through the regular WP Add User interface.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.