mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add email and login dupe checking down into wp_insert_user(). Tidy up user-new.php. see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -980,6 +980,12 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
else
|
||||
$caps[] = $cap;
|
||||
break;
|
||||
case 'create_users':
|
||||
if ( is_multisite() && !get_site_option( 'add_new_users' ) )
|
||||
$caps[] = 'do_not_allow';
|
||||
else
|
||||
$caps[] = $cap;
|
||||
break;
|
||||
default:
|
||||
// If no meta caps match, return the original cap.
|
||||
$caps[] = $cap;
|
||||
|
||||
Reference in New Issue
Block a user