The MU forums have moved to WordPress.org

Registration for Subblog (might be a stupid question) (8 posts)

  1. do77
    Member
    Posted 14 years ago #

    Hi,

    this might be a really stupid question but it seems that I have kind of misunderstanding the registration principle of WPMU. When a new user wants to register for lets say testblog.example.com, why does he/she get redirected to the sign-up site for the parent blog? Is a user that signs up for Blog A of example.com automatically a user of ALL blogs that belong example.com?

  2. do77
    Member
    Posted 14 years ago #

    And why does every user gets redirected to the parent blog when logging in on another blog? That does not make any sense to me? And confuses every user...

  3. SteveAtty
    Member
    Posted 14 years ago #

    Have you checked all your DNS and apache wildcard settings?

  4. do77
    Member
    Posted 14 years ago #

    Yes, my wildcard settings should be fine. And I actually found this post. So I guess that is really how it is!?

    I hope not...

  5. SteveAtty
    Member
    Posted 14 years ago #

    The logging into another blog re-direction is odd - it shouldn't be happening.

    But when they want to sign up for a new blog (testblog.example.com,) then it has to redirect to example.com for the signup because there isn't anything in the database for testblog.example.com,

  6. do77
    Member
    Posted 14 years ago #

    That means its basically impossible for users to sign up for a 'specific' blog!? They always sign up for example.com and then they are automatically able to login to all subblogs of example.com. Thats kind of strange, don't you think?

    As far as the logging in redirect goes: Users are usually redirected to the backend after logging in so it makes sense that they end up on the main blog as this is where they actually 'belong to'. Does that mean that I need to install a plugin that redirects them to the homepage? And this way they get redirected to the subblog's homepage?

  7. do77
    Member
    Posted 14 years ago #

    Ok, the 'Theme-my-Login' plugin at least kills two birds with one stone ... it styles the login AND resolves the issue with the redirect.

    I still think the registration process is kind of a pain.... :)

  8. Bakerman
    Member
    Posted 13 years ago #

    I have found this Solution:

    Problem:
    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.

    First solution:
    WPMU Per-Blog Registrations Plugin by Nathan Kinkade:
    http://code.creativecommons.org/viewsvn/wordpressmu/trunk/mu-
    plugins/per_blog_registrations/perBlogRegistrations.php?view=log
    This did not work for us. Users still got redirected to the Main Blog with wp-signup.php.

    Second solution:
    Prerequisite:
    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’ );
    //exit;
    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”);
    }
    else
    {
    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

About this Topic