WordPress at a glance
function is not described

user_can_edit_user() WP 1.5.0

Deprecated from version 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.

No Hooks.

Return

true|false. Null. Nothing.

Usage

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

Notes

  • See: current_user_can()

Changelog

Since 1.5.0 Introduced.
Deprecated Since 2.0.0 Use current_user_can()

Code of user_can_edit_user() WP 5.7

<?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;
}