Skip to content

Instantly share code, notes, and snippets.

@KZeni
Created March 10, 2015 19:36
Show Gist options
  • Select an option

  • Save KZeni/7eb0ac27cfe0a2ac1af3 to your computer and use it in GitHub Desktop.

Select an option

Save KZeni/7eb0ac27cfe0a2ac1af3 to your computer and use it in GitHub Desktop.
Auto-Activate WordPress Multi-Site/Network Users After Registration (disable activation)
// Auto-activate users after registration
function my_disable_activation( $user, $user_email, $key, $meta = '' ){
// Activate the user
$user_id = wpmu_activate_signup( $key );
wp_set_auth_cookie( $user_id, true, is_ssl() );
wp_redirect( /*redirect to */ site_url() );
exit;
}
add_filter( 'wpmu_signup_user_notification', 'my_disable_activation', 10, 4 );
@KZeni

KZeni commented Mar 10, 2015

Copy link
Copy Markdown
Author

You can add this to the active theme's functions.php file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment