Created
March 10, 2015 19:36
-
-
Save KZeni/7eb0ac27cfe0a2ac1af3 to your computer and use it in GitHub Desktop.
Auto-Activate WordPress Multi-Site/Network Users After Registration (disable activation)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 ); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add this to the active theme's functions.php file.