mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Properly check, initialize, or cast a number of variables. props ChenHui. see #14642.
git-svn-id: https://develop.svn.wordpress.org/trunk@16377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -55,14 +55,14 @@ function add_user() {
|
||||
*/
|
||||
function edit_user( $user_id = 0 ) {
|
||||
global $wp_roles, $wpdb;
|
||||
if ( $user_id != 0 ) {
|
||||
$user = new WP_User( $user_id );
|
||||
if ( $user_id ) {
|
||||
$update = true;
|
||||
$user->ID = (int) $user_id;
|
||||
$userdata = get_userdata( $user_id );
|
||||
$user->user_login = $wpdb->escape( $userdata->user_login );
|
||||
} else {
|
||||
$update = false;
|
||||
$user = '';
|
||||
}
|
||||
|
||||
if ( !$update && isset( $_POST['user_login'] ) )
|
||||
|
||||
Reference in New Issue
Block a user