Registration possible only for the Main Blog with Setting „User Accounts Registration only“.
Required: Users can register for multiple Sub Blogs.
Use Case: A Faculty member set up different blogs. Students were assigned to write posts
on these blogs. They registered and had subscriber status for the Main Blog. Now they
were manually added to the desired blog. With approximately 100 students there is a lot to
do. So it would be nice to have students automatically sign up for a specific blog.
WPMU Per-Blog Registrations Plugin by Nathan Kinkade:
This did not work for us. Users still got redirected to the Main Blog with wp-signup.php.
Sub Blog Setting is „Users can Register“: 1
Changes in wp-login.php:
1) In the Main part in case ‚register‘ two lines should be commented out: wp_direct and
exit. These are the lines responsible for redirecting to wp-sign-up with the Main Blog.
If the redirect does not take place, users can register with the Sub Blog.
case ‚register‘ :
// WPMU doesn’t use this
//wp_redirect( get_bloginfo(‚wpurl‘) . ‚/wp-signup.php‘ );
With these changes users can register only once for one Sub Blog. For another Sub Blog
they would have to log in with a new account. To allow students to register with multiple
Sub Blogs further changes have to be made in wp-login.php.
2) For multiple Sub Blog Registration the function „register_new_user“ is supplemented
by the following request: If a user is already registered username and email both have to
be existent. If they both exist, the user is added as a subscriber to the blog:
Following the line: $user_email = apply_filters( ‚user_registration_email‘, $user_email );
these lines are added:
if( username_exists( $user_login ) && email_exists( $user_email ) )
$userid = username_exists( $user_login );
add_user_to_blog( $current_site->blog_id, $userid, „subscriber“);
The closing bracket is placed after return $user_id;
3. What does the user get? The user goes to register for the Sub Blog and fills in his or her
username and email adress. With first time registering a password is sent to the person’s
email adress. If already registered, there is no password sent. So it would be nice to read