Again a new topic.
Those auto close function is quit anoying…
This is the original topic: http://www.s2member.com/forums/topic/diferences-between-multisite-and-free-version/
This the follow up: http://www.s2member.com/forums/topic/continuing-closed-topic/
The bugg is still there as descriped in the first topic.
I have made a small fix but it is not clean/compleetly secure.
This works when creating a new plugin file in the plugin folder.
Site admins are now able to edit there own subsite users.
One importand bug (missing feature) remains:
The script does NOT check if the edited-user is a member of the subsite!
This meens that you can edit the superadmin when you are a subadmin user…
Anyone knowing how to check if edited user is member of subsite, please let me know!
———————————————————————————————————-
/*
Plugin Name: Subsite admin user edit abillitty
Plugin URI: http://www.mortydot.nl
Description: Makes it for subsite admins possible to edit there own members
Version: 1.0
Author: MortyDot
License: GPL2
*/
function mc_admin_users_caps( $caps, $cap, $user_id, $args ){
foreach( $caps as $key => $capability ){
if( $capability != 'do_not_allow' )
continue;
switch( $cap ) {
case 'edit_user':
case 'edit_users':
$caps[$key] = 'edit_users';
break;
case 'delete_user':
case 'delete_users':
$caps[$key] = 'delete_users';
break;
case 'create_users':
$caps[$key] = $cap;
break;
}
}
return $caps;
}
add_filter( 'map_meta_cap', 'mc_admin_users_caps', 10, 4 );
add_filter( 'enable_edit_any_user_configuration', '__return_true');
?>
-
This topic was modified 4 years, 6 months ago by
Raam Dev. Reason: Moved to Community Forum (not Pre-sale question)
-
This topic was modified 3 years, 4 months ago by
Sven Lohuis.