Front end ,
I wish admins of subsites (they don’t have access to the core / BD of WP !) to be able to add existing main site users easily => select them from a list, or at least browse them, then cust&paste their Ids as new users to their subsite.
Assuming the blog ID is 1:
<ul>
<?php
$blogusers = get_users('blog_id=1&orderby=nicename');
foreach ($blogusers as $user) {
echo '<li>' . $user->user_login . '</li>';
}
?>
</ul>
I wish admins of subsites (they don’t have access to the core / BD of WP !) to be able to add existing main site users easily => select them from a list, or at least browse them, then cust&paste their Ids as new users to their subsite.
In 3.4 there’s auto-fill for user names. And I think someone made a plugin for dropdowns…
thanks, indeed that plugin does it for the superAdmin => network admin !
for exemple it works on page wp-admin/network/site-users.php?id=X
but for a subsite admin, he has acces only to his subsite user administration:
wp-admin/user-new.php
then, on this page the plugin doesn’t apply .
I want subsite blog admins to be able to add users from existing users listed on the main site.
I didn’t tried the code you proposed
“… $blogusers = get_users(‘blog_id=1&orderby=nicename’); …”
because I don’t know where to put that code !?
Thanks .
I want subsite blog admins to be able to add users from existing users listed on the main site.
You really can’t. Site Admins don’t have access to SEE users who aren’t on their sites. It’s for security.