From 5fbd6657f447a035902ab0f90cfe5e558defd73a Mon Sep 17 00:00:00 2001 From: duck_ Date: Thu, 5 Jan 2012 21:02:42 +0000 Subject: [PATCH] s/add_user()/edit_user()/, see r19686 and #18749. git-svn-id: http://svn.automattic.com/wordpress/trunk@19689 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 6 +++--- wp-admin/user-new.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 1bc8440296..12a57c4d42 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -890,11 +890,11 @@ case 'add-meta' : break; case 'add-user' : check_ajax_referer( $action ); - if ( !current_user_can('create_users') ) + if ( ! current_user_can('create_users') ) die('-1'); - if ( !$user_id = add_user() ) + if ( ! $user_id = edit_user() ) { die('0'); - elseif ( is_wp_error( $user_id ) ) { + } elseif ( is_wp_error( $user_id ) ) { $x = new WP_Ajax_Response( array( 'what' => 'user', 'id' => $user_id diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index f0555e18d4..282b0c960b 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -92,8 +92,8 @@ Please click the following link to confirm the invite: if ( ! current_user_can('create_users') ) wp_die(__('Cheatin’ uh?')); - if ( !is_multisite() ) { - $user_id = add_user(); + if ( ! is_multisite() ) { + $user_id = edit_user(); if ( is_wp_error( $user_id ) ) { $add_user_errors = $user_id;