WordPress at a glance
function is not described

user_can_edit_user() WP 1.5.0

Deprecated in 2.0.0. It is no longer supported and can be removed in future releases. Use current_user_can() instead.

Can user can edit other user.

  • See: current_user_can()

No Hooks.

Return

true/false.

Usage

user_can_edit_user( $user_id, $other_user );
$user_id(int) (required)
$other_user(int) (required)

Code of user can edit user: wp-includes/deprecated.php WP 5.2.2

<?php
function user_can_edit_user($user_id, $other_user) {
	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );

	$user  = get_userdata($user_id);
	$other = get_userdata($other_user);
	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
		return true;
	else
		return false;
}