Skip to:
Content
Pages
Categories
Search
Top
Bottom

User registration: sign up as user for two different blogs – error

  • @toregus

    Participant

    Hi!

    I’m using WPMU (latest) and Buddypress (latest, not trunk) + automattics P2 microblogging theme (latest).

    Objective: I’ve got two blogs besides BP and the second one is for all the users. The first is a root-blog and only intended for non-members who perhaps want to become members. It’s a closed website and non-members cannot see the second blog.

    When using the P2-theme (second blog) I need to have all users have the role “author”. But when signing up the users only get the author-role for the primary root-blog and not the secondary. I’ve tried to use a wpmu-plugin (just some text) which uses this code:

    (from here: http://mu.wordpress.org/forums/topic/13675?replies=12#post-83298 )

    add_action( 'wpmu_new_user', 'ds_new_user_meta', 10, 2);
    function ds_new_user_meta($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }

    This code seemingly works for others users but gives me this error message with buddypress:

    Warning: Cannot modify header information – headers already sent by (output started at /home/xxxxx/public_html/xxx.com/wp-content/mu-plugins/new-user.php:8) in /home/xxxxx/public_html/xxxxx.com/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-signup.php on line 5

    What’s wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @jeffsayre

    Participant

    Tore, read this and see if that helps.

    I would first search the most recent file you modified, making sure that you did not add whitespace before or after the php tags. It appears that that would be new-user.php. If you cannot find the issue in that file, then move on to the the next file you modified, looking for the same issue.

    @toregus

    Participant

    Thanks for the answer Jeff! It was white space that was causing it.

    I’ll go back and work with this alchemy… ;)

    @jeffsayre

    Participant

    I’m glad it helped!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User registration: sign up as user for two different blogs – error’ is closed to new replies.
Skip to toolbar