Adding users to another blog

You said you wanna register any user to other blogs when a user is created. But this get_current_user_id() doesn’t fire on user creation. You better have a look on wp-includes/user.php at line 1401 the wp_insert_user function. WordPress default registering process uses this function to insert new users. And if you wanna create the user manually … Read more

Which action hook to update custom field at network/site-info.php in multisite on update site info

After some more research I found a solution, turned out that I had to use admin_init.. function pg_save_custom_site_options(){ global $pagenow; if( ‘site-info.php’ == $pagenow && isset($_REQUEST[‘action’]) && ‘update-site’ == $_REQUEST[‘action’] ) { if ( isset( $_POST[‘blog’][‘custom_limit_amount’] ) ) { $new_field_value = intval( $_POST[‘blog’][‘custom_limit_amount’] ); if( is_int($new_field_value) ){ update_blog_option( $_POST[‘id’], ‘custom_limit_amount’, $new_field_value ); } } } … Read more