Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 12th May 2010, 11:07 PM   #1
New Warrior Member
War Room Member
 
Join Date: 2007
Location: Arizona USA
Posts: 24
Thanks: 86
Thanked 1 Time in 1 Post
Blog Entries: 1
Default
Add Current users WPMU to All Future Blogs Created by Admin
Share on: 
fb share twitter share gplus share more share

i'm running into a quandry here.. I need to write a wp plugin to add all current contributors to any new blogs created by admin in wpmu.. any ideas? to this point I have it adding new users to all existing blogs with this:

<?php
add_action('wpmu_new_user', 'reg_user_as_contributor');

function reg_user_as_contributor($user_id){
$blog_array = get_blogs_of_user(1);
foreach($blog_array as $admin_blog){
add_user_to_blog( $admin_blog->userblog_id, $user_id, 'contributor' );
}
}
?>
Sarah Harris is offline  
Closed Thread


Bookmarks

Tags
add, admin, blogs, created, current, future, users, wpmu


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 08:39 AM.